- Add requireAuth middleware using Better Auth session validation - Apply to all game routes (start, answer) - Unauthenticated requests return 401
26 lines
566 B
JSON
26 lines
566 B
JSON
{
|
|
"name": "@glossa/api",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/server.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/server.js",
|
|
"test": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@glossa/db": "workspace:*",
|
|
"@glossa/shared": "workspace:*",
|
|
"better-auth": "^1.6.2",
|
|
"cors": "^2.8.6",
|
|
"express": "^5.2.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^5.0.6",
|
|
"@types/supertest": "^7.2.0",
|
|
"supertest": "^7.2.2",
|
|
"tsx": "^4.21.0"
|
|
}
|
|
}
|