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
+5
View File
@@ -0,0 +1,5 @@
module.exports = {
testEnvironment: 'node',
testMatch: ['**/*.test.js'],
testTimeout: 10000,
};