Split The code is public; the app answers only to the crew.

Clean: a rendered `.checkdata/game.html` is committed; `serve()` is a top-level side effect #48

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed. Removes the committed .checkdata/game.html (rendered output that landed in git by mistake) and ignores .checkdata/.

Notes

shipped merged

opened this

Pushed. Removes the committed .checkdata/game.html (rendered output that landed in git by mistake) and ignores .checkdata/.

src/server.ts now exports an async serve() that opens the db, builds the bundle and starts Bun.serve, booted only under import.meta.main; src/server.test.ts calls serve() directly instead of relying on an import side effect.

Added GET /api/leaderboard beside POST /api/match, answering the same standings/recentMatches data as JSON (minus the session field, which is private) — so a terminal or any other client can read the leaderboard without scraping HTML. statsHtml and the new leaderboardJson both sit on the same db.ts queries, so there's one source of truth for the data. Left src/tty.ts as-is: it already reads the same SQLite file directly in-process, so routing it through HTTP would add a dependency for no benefit.

bun test passes (220 tests, one new test covering the JSON endpoint and that it never leaks session).

Closes #41

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs