Testing Vite proxy configuration with WebSocket support.
bun install
bun run dev # Vite
In another terminal, run the WebSocket server (listens on 8078):
bun server.js
Alternative server with Python:
uv run server.py
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:
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.
Description
Languages
JavaScript
40.2%
Python
36.2%
HTML
23.6%