This tutorial walks you through running the project from a new git clone.
- Node.js 18+
- npm 9+
git clone https://github.com/Lolner95/DS-COM
cd DS-COMThis repo uses npm workspaces, so install once from the root:
npm installStarts both the client and the WebSocket server:
npm run devOpen:
- Client: http://localhost:5173
- Server: ws://localhost:8080
To point the client at a different WS endpoint, set VITE_WS_URL:
VITE_WS_URL=ws://localhost:8080 npm run devProduction example:
VITE_WS_URL=wss://your-domain.com/ws npm run devWhen unset in production, the client uses ws(s)://<host>/ws.
npm run buildOutputs:
- Client build:
client/dist - Server build:
server/dist
npm run startServe client/dist from a static host (Nginx, Caddy, etc.).
Reverse proxy /ws to the Node WS server (default localhost:8080) so
https://<host> works for both domain and IP.
Server data is stored here:
server/data/db.json
Make sure the server can write to server/data/. Delete the file to reset data.
- Port 8080 already in use: change
PORTinserver/src/index.ts, then rebuild. - Client not connecting: verify
VITE_WS_URLor your/wsreverse proxy.