From 5c48c6061e2ad8801e8209a7af0f95a9c50c8f2a Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 16 Jun 2025 19:19:49 -0600 Subject: [PATCH] Add a README --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0085360 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Testing Vite proxy configuration with WebSocket support. + +```sh +bun install +bun run dev # Vite +``` + +In another terminal, run the WebSocket server (listens on 8078): + +```sh +bun server.js +``` + +Then, open your browser and navigate to `http://localhost:5173` and open the developer console to see how it doesn't work. + +In development console you can directly connect to the WebSocket server using: + +```javascript +const ws = new WebSocket('ws://localhost:8078') +ws.onmessage = console.log +ws.send("Testing") +``` + +This should work, and the server also prints the message on console.