docs: add contributor and Colyseus guides

feat(client): parametrize WS/API via VITE_WS_URL and VITE_API_URL; add .env.example and README env section
This commit is contained in:
2025-08-07 17:10:08 -06:00
parent 5a273766a6
commit 1912b3a76f
5 changed files with 200 additions and 10 deletions

View File

@@ -188,6 +188,17 @@ This will start:
- Server on http://localhost:3000
- Client on http://localhost:5173
### Environment Variables (Client)
Create `client/.env` (or copy `client/.env.example`) to configure endpoints:
```
VITE_WS_URL=ws://localhost:3000
VITE_API_URL=http://localhost:3000/api
```
For production over HTTPS, use `wss://` for `VITE_WS_URL` and an HTTPS API base for `VITE_API_URL`.
## URLs
- **Game**: http://localhost:5173
@@ -247,4 +258,4 @@ The admin dashboard provides:
- `POST /api/rooms/:roomId/resume` - Resume a game
- `POST /api/rooms/:roomId/restart` - Restart a game
- `POST /api/rooms/:roomId/kick/:playerId` - Kick a player
- `GET /api/stats` - Get global server statistics
- `GET /api/stats` - Get global server statistics