// server/index.js — process entry & boot (DESIGN §1, §2). // // * node:http static server: / → public/ (index.html for directories) // /data/ → data/ (generated game data) // /shared/ → shared/ (ESM shared with the browser) // /sim/ → server/sim/ (the battle simulation, read-only, `.js` only — client-side // combat, DESIGN §14; the Node-only loader nodeData.js is not served) // /data.js → a generated browser stand-in of server/data.js (the sim's content modules // import `../../../data.js`; in the browser it serves the data injected with // /sim/simdata.js setSimData). No other server file is ever served. // /media/bgm/act1 → public/assets/audio/bgm/act1.mp3 — the same audio files, addressed // **without** an extension so download managers (IDM / 迅雷 …) stop popping a // "下载文件信息" dialog for every BGM track (shared/media.js, public/js/media.js) // MIME types incl. .mjs/.js text/javascript, .skel application/octet-stream, .atlas text/plain; // gzip for text-like types, .skel and uncompressed fonts when the client accepts it (small files are // compressed once and cached in memory); strong ETag + Last-Modified with 304s; Cache-Control // (html & code/data: no-cache + revalidate; public/assets|fonts|vendor: 1 day; any `?v=` URL: immutable); // single byte-range requests (206/416, used by