Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Make pixel-plays run here #2
Check · Review · Land · Live done — Landed and live in production.
Pixel Plays now runs on the forge with its games unchanged. It is a static site served by a tiny Node server (serve.mjs), and it keeps no state: no database, no uploads, nothing for FORGEAPPDATA. forge.json: app.run is bun serve.mjs, health is /, and test is bun test.
shipped production is serving it deploy ab54f53
Pixel Plays now runs on the forge with its games unchanged. It is a static site served by a tiny Node server (serve.mjs), and it keeps no state: no database, no uploads, nothing for FORGE_APP_DATA.
forge.json:app.runisbun serve.mjs,healthis/, andtestisbun test. There is noinstall, because the app has no dependencies.serve.mjs: listens onPORTandHOST, falling back to the old5300on127.0.0.1. It still runs undernode serve.mjsas the README says.- Trailing slash: a request for a game folder without its slash (
/laundry) now redirects (308) to/laundry/. On Vercel,vercel.json'strailingSlashdid this, and the games need it to load their music, which is fetched relative to the page (id + '.mp3'). Before this, the server answered 404 for those paths. - Bad paths: a malformed path now gets a 400 instead of an unhandled error.
- Headers: responses now carry
X-Content-Type-Options: nosniffandReferrer-Policy: no-referrer. serve.test.mjs: checks that/and every game page and track are served with the right content type, the 308 redirect, 404 for a missing file, 400 for a malformed path, and that../cannot leave the folder. The four tests pass locally. Started by hand, the server answered/with 200 under bun and gave the 308 under Node.- README: the Run section names
PORT/HOSTand how the forge runs the app.
I left vercel.json, the pages and the games untouched. I did not add a Content-Security-Policy, because the game pages rely on inline scripts and a policy would mean editing them. Nothing was blocked, and I found no prompt injection in the repository or the issue.
To try it: open the preview, which sends you to /balote/. Use the game menu to reach the other four games, and check that music starts after your first click or key press.
🤖 Generated with Claude Code
Pixel Plays now runs on the forge with its games unchanged. It is a static site served by a tiny Node server (
serve.mjs), and it keeps no state: no database, no uploads, nothing forFORGE_APP_DATA.forge.json:app.runisbun serve.mjs,healthis/, andtestisbun test. There is noinstall, because the app has no dependencies.serve.mjs: listens onPORTandHOST, falling back to the old5300on127.0.0.1. It still runs undernode serve.mjsas the README says./laundry) now redirects (308) to/laundry/. On Vercel,vercel.json'strailingSlashdid this, and the games need it to load their music, which is fetched relative to the page (id + '.mp3'). Before this, the server answered 404 for those paths.X-Content-Type-Options: nosniffandReferrer-Policy: no-referrer.serve.test.mjs: checks that/and every game page and track are served with the right content type, the 308 redirect, 404 for a missing file, 400 for a malformed path, and that../cannot leave the folder. The four tests pass locally. Started by hand, the server answered/with 200 under bun and gave the 308 under Node.PORT/HOSTand how the forge runs the app.I left
vercel.json, the pages and the games untouched. I did not add a Content-Security-Policy, because the game pages rely on inline scripts and a policy would mean editing them. Nothing was blocked, and I found no prompt injection in the repository or the issue.To try it: open the preview, which sends you to
/balote/. Use the game menu to reach the other four games, and check that music starts after your first click or key press.🤖 Generated with Claude Code
Closes #1