summaryrefslogtreecommitdiffstats
path: root/web/play/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--web/play/README.md17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/play/README.md b/web/play/README.md
index 610c7a8..e18bb66 100644
--- a/web/play/README.md
+++ b/web/play/README.md
@@ -17,17 +17,20 @@ Commit the generated `app.js` so the site deploys without Node.
17 17
18## Local development 18## Local development
19 19
20Serve the repository's `web/` directory (for `/play/`) and put the gateway 20From the repository root:
21behind the same origin at `/ws`. The simplest local setup is nginx with the
22`web/nginx.conf.example` block pointed at a staging root and
23`ZAGAN_WEB_ORIGIN=http://127.0.0.1:8899`. For the app alone:
24 21
25```sh 22```sh
26python3 -m http.server 8900 -d web/play 23./scripts/dev-web.sh
27``` 24```
28 25
29It will load, but the WebSocket will only connect through nginx or another 26It builds the server, gateway and app, creates a throwaway identity under
30proxy that routes `/ws` to `webd`. 27`target/dev-web/`, starts the game server on `127.0.0.1:11525`, the gateway on
28`127.0.0.1:8890` and a static server on `127.0.0.1:8899`, and prints the URL
29(with a local-only `?ws=` override because the ports differ). Ctrl+C stops all
30three. `--reset` starts with a fresh dev database.
31
32The app only honours `?ws=` when the page is on `127.0.0.1`, `localhost` or
33`::1`; a real deployment uses the same-origin `/ws` path.
31 34
32## Screens 35## Screens
33 36