adapter-node-ws
adapter-node-ws copied to clipboard
Adapter for SvelteKit apps that generates a standalone Node server with support for WebSockets.
you could just listen the upgrade event on the http server of vite development server and only handle the request when `req.headers["sec-websocket-protocol"] !== "vite-hmr"` how i do it: https://github.com/eslym/vite-plugin-express-app/blob/ed1d3f3c520b3ac628a1134aa53bdc7b61578576/src/index.ts#L33
I have added an example for easy preview of this library. Also e2e tests are created for both dev and prod modes. There are a few bugs, mostly regarding hot-reloading...
First of all: thank you for creating this. Now for the PR: I wanted to use `Socket.io` instead of `ws` This is by far not complete. But before I continue...