diff options
Diffstat (limited to '')
| -rw-r--r-- | web/README.md | 27 |
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 | ||
| 21 | Serve `web/` as the document root. Binaries in `bin/` are gitignored. | 22 | Serve `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 | ||
| 27 | in `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 | ||
| 29 | server key. nginx serves `/play/` and proxies `/ws` to `127.0.0.1:8890`. | ||
| 30 | |||
| 31 | Build it before publishing: | ||
| 32 | |||
| 33 | ```sh | ||
| 34 | cd web/play | ||
| 35 | npm ci | ||
| 36 | npm run build # writes app.js | ||
| 37 | cd ../.. | ||
| 38 | ``` | ||
| 39 | |||
| 40 | Commit 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 | ||
| 42 | notes in `webd/README.md`; it is not part of the player download. | ||
| 43 | |||
| 23 | ## Naming | 44 | ## Naming |
| 24 | 45 | ||
| 25 | The page only lists files that match the release pattern; anything else in | 46 | The 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 |
| 133 | half-written binary, then fetches the live page and every artifact it lists — | 154 | half-written binary, then fetches the live page and every artifact it lists — |
| 134 | GUI apps, installers, terminal clients and servers — and compares the | 155 | GUI apps, installers, terminal clients and servers — and compares the |
| 135 | downloaded bytes with the local SHA-256. `--verify-only` skips the | 156 | downloaded bytes with the local SHA-256. It also fetches `/play/`, `app.js` and |
| 136 | upload 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. |
| 137 | prune them by hand. | 158 | Old versions are left on the server; prune them by hand. |
| 138 | 159 | ||
| 139 | A local directory works as a target, which is how the verification itself is | 160 | A local directory works as a target, which is how the verification itself is |
| 140 | tested: | 161 | tested: |
