Add a README
This commit is contained in:
parent
36cb2f69f0
commit
5c48c6061e
24
README.md
Normal file
24
README.md
Normal file
@ -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.
|
Loading…
x
Reference in New Issue
Block a user