diff --git a/tools/release/game-static.mjs b/tools/release/game-static.mjs new file mode 100644 index 0000000..8ff1fec --- /dev/null +++ b/tools/release/game-static.mjs @@ -0,0 +1,158 @@ +/** + * Minimal static server for the built game. + * + * A dependency-free replacement for the separate `game-web` Caddy service, + * started by `start-all.mjs`. Content-hashed assets are cached hard; the shell + * must revalidate so an update is actually picked up (PRD §27.4). + * + * Two things a real file server does that this one used to skip, both found + * when Þrøngva's album shipped and not one track of it played in production: + * + * - **The URL is percent-decoded before it touches the filesystem.** The + * browser asks for `Þrøngva/After%20the%20Winter%20of%20Want/001.%20...`; + * looking that up literally finds nothing, and the SPA fallback answered + * every track with `index.html` and a 200. Any file with a space or a + * non-ASCII letter in its name had never been servable, including the old + * `More Than Enough.mp3`. + * - **Byte ranges.** An `