tools/serve.py: build, serve and rebuild on change (t9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 01:07:08 -04:00
co-authored by Claude Opus 5.5
parent 259ad89ded
commit 1a3a848bad
7 changed files with 117 additions and 8 deletions
+14 -2
View File
@@ -1,11 +1,23 @@
---
id: t9
title: Script to run the local server for testing
status: Todo
status: Review
created: 2026-10-24
updated: 2026-10-24T04:41:46Z
updated: 2026-10-24T05:06:19Z
order: 3
report: |
(agent) New: python3 tools/serve.py builds the game, serves it at http://localhost:8000 and
rebuilds by itself when anything in src/ changes. Pages aren't cached, so a normal refresh
shows the new build. If 8000 is taken (an old server still running), it uses 8001 and says so.
To check: stop your old server (Ctrl+C), run python3 tools/serve.py, open the address it
prints, change something in src/, refresh. Ctrl+C stops it.
---
## Context
- i need a script to run the local server for testing.
## Subtasks
- [x] Add the server and update the command references and map.
- [x] Check serving, rebuilds, port fallback and shutdown; run the headless suites.