summaryrefslogtreecommitdiffstats
path: root/web/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--web/README.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/web/README.md b/web/README.md
index 81346fd..3e81468 100644
--- a/web/README.md
+++ b/web/README.md
@@ -13,6 +13,7 @@ web/
13 releases.php shared scanner and hash cache 13 releases.php shared scanner and hash cache
14 install.sh stable Linux installer 14 install.sh stable Linux installer
15 install.ps1 stable Windows installer 15 install.ps1 stable Windows installer
16 play/ browser app, served at /play/
16 bin/gui/ apps, served at /bin/gui/... 17 bin/gui/ apps, served at /bin/gui/...
17 bin/client/ terminal clients 18 bin/client/ terminal clients
18 bin/server/ servers 19 bin/server/ servers
@@ -20,6 +21,26 @@ web/
20 21
21Serve `web/` as the document root. Binaries in `bin/` are gitignored. 22Serve `web/` as the document root. Binaries in `bin/` are gitignored.
22 23
24## Browser app
25
26`play/` is a static vanilla TypeScript app. It talks to the WebSocket gateway
27in `webd/`, not to the game server: the browser sends `Command` JSON and renders
28`View` JSON, and the gateway owns the upstream TLS connection and the pinned
29server key. nginx serves `/play/` and proxies `/ws` to `127.0.0.1:8890`.
30
31Build it before publishing:
32
33```sh
34cd web/play
35npm ci
36npm run build # writes app.js
37cd ../..
38```
39
40Commit the generated `app.js`; the site then needs no Node at deploy time.
41`npm run typecheck` checks the sources. The gateway has its own deployment
42notes in `webd/README.md`; it is not part of the player download.
43
23## Naming 44## Naming
24 45
25The page only lists files that match the release pattern; anything else in 46The page only lists files that match the release pattern; anything else in
@@ -132,9 +153,9 @@ Then open <http://127.0.0.1:8899/>.
132`deploy.sh` rsyncs `web/` with `--delay-updates`, so a visitor never sees a 153`deploy.sh` rsyncs `web/` with `--delay-updates`, so a visitor never sees a
133half-written binary, then fetches the live page and every artifact it lists — 154half-written binary, then fetches the live page and every artifact it lists —
134GUI apps, installers, terminal clients and servers — and compares the 155GUI apps, installers, terminal clients and servers — and compares the
135downloaded bytes with the local SHA-256. `--verify-only` skips the 156downloaded bytes with the local SHA-256. It also fetches `/play/`, `app.js` and
136upload and only checks the live site. Old versions are left on the server; 157`style.css`. `--verify-only` skips the upload and only checks the live site.
137prune them by hand. 158Old versions are left on the server; prune them by hand.
138 159
139A local directory works as a target, which is how the verification itself is 160A local directory works as a target, which is how the verification itself is
140tested: 161tested: