26 lines
781 B
Markdown
26 lines
781 B
Markdown
# Nexus preview deploy
|
|
|
|
The Nexus frontend must be served over HTTP for ES modules to boot. This repo now includes a preview stack that serves the frontend on a proper URL and proxies `/api/world/ws` back to the existing Nexus WebSocket gateway.
|
|
|
|
## Quick start
|
|
|
|
```bash
|
|
docker compose up -d nexus-main nexus-preview
|
|
```
|
|
|
|
Open:
|
|
- `http://localhost:3000`
|
|
|
|
The preview service serves the static frontend and proxies WebSocket traffic at:
|
|
- `/api/world/ws`
|
|
|
|
## Remote preview
|
|
|
|
If you run the same compose stack on a VPS, the preview URL is:
|
|
- `http://<host>:3000`
|
|
|
|
## Notes
|
|
- `nexus-main` keeps serving the backend WebSocket gateway on port `8765`
|
|
- `nexus-preview` serves the frontend on port `3000`
|
|
- The browser can stay on a single origin because nginx proxies the WebSocket path
|