A SvelteKit implementation of the Getting started chat tutorial on the Socket.io website chat.
nvm use
npm i
npm run server
The difference between this demo and the Socket.io one is that this demo sends messages through SvelteKit Form Actions instead of directly through Socket.io. This allows you to do things such as validate messages on the server side or reject them altogether before emitting them while still being able to import anything using Vite (such as $lib
imports, etc)
Currently the Vite dev server is not implemented, you have to test using production builds.