- Connection pool and a small migration runner (schema_migrations, one transaction per migration, advisory lock) - games and game_players tables with indexes for a user's games and for popular games - PostgresGameHistoryRepository: idempotent save, get, recent games of a user, popular games - Integration tests against a real Postgres via testcontainers; a custom Jest environment gives tests Node's web globals, which Jest 27 leaves out - GameRecord carries the number of distinct spectators
44 lines
1.0 KiB
JSON
44 lines
1.0 KiB
JSON
{
|
|
"name": "@mancala/backend",
|
|
"version": "0.4.7",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"start": "node dist/index.js",
|
|
"dev": "nodemon src/index.ts",
|
|
"build": "tsc",
|
|
"test": "jest",
|
|
"coverage": "jest --coverage"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"@mancala/core": "link:../../packages/core",
|
|
"@types/cors": "^2.8.10",
|
|
"@types/morgan": "^1.9.3",
|
|
"@types/uuid": "^8.3.0",
|
|
"@types/ws": "^7.4.5",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.17.1",
|
|
"jose": "5.10.0",
|
|
"mancala.js": "link:../../packages/mancala.js",
|
|
"morgan": "^1.10.0",
|
|
"pg": "8.23.1",
|
|
"uuid": "^8.3.2",
|
|
"ws": "^7.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/express": "^4.17.12",
|
|
"@types/jest": "^26.0.23",
|
|
"@types/node": "^15.12.4",
|
|
"@types/pg": "8.23.1",
|
|
"jest": "^27.0.5",
|
|
"nodemon": "^2.0.7",
|
|
"testcontainers": "12.2.0",
|
|
"ts-jest": "^27.0.3",
|
|
"ts-node": "^10.0.0",
|
|
"typescript": "^4.7.4"
|
|
}
|
|
}
|