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:
13
README.md
13
README.md
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user