M1: backend (Express+ws+better-sqlite3) + integration tests

- server/db.js: SQLite schema mirroring Firestore doc tree
- server/handlers.js: action -> shared turn fn -> tx persist -> broadcast
- server/index.js: REST endpoints + WebSocket real-time push
- server/server.test.js: 7 integration tests (REST CRUD + combat flow)
- --forceExit for jest (open WS handles)

Backend boots, serves state, persists to SQLite.
This commit is contained in:
david raistrick
2026-06-28 17:01:53 -04:00
parent e06adaa081
commit 0e76fb2fc7
6 changed files with 821 additions and 1 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"scripts": {
"dev": "node --watch index.js",
"start": "node index.js",
"test": "jest"
"test": "jest --forceExit"
},
"dependencies": {
"@ttrpg/shared": "*",