Phase 1 done

This commit is contained in:
Joey Yakimowich-Payne 2026-01-13 14:14:30 -07:00
commit 9a3fc97a34
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
14 changed files with 496 additions and 33 deletions

15
server/Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM node:22-alpine
WORKDIR /app
RUN apk add --no-cache python3 make g++
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3001
CMD ["npm", "start"]

28
server/package.json Normal file
View file

@ -0,0 +1,28 @@
{
"name": "kaboot-backend",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"better-sqlite3": "^11.7.0",
"cors": "^2.8.5",
"express": "^4.21.2",
"jsonwebtoken": "^9.0.2",
"jwks-rsa": "^3.1.0",
"uuid": "^11.0.5"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.12",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/jsonwebtoken": "^9.0.7",
"@types/node": "^22.10.7",
"@types/uuid": "^10.0.0",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
}
}

16
server/src/index.ts Normal file
View file

@ -0,0 +1,16 @@
import express from 'express';
import cors from 'cors';
const app = express();
const PORT = process.env.PORT || 3001;
app.use(cors({ origin: process.env.CORS_ORIGIN || 'http://localhost:5173' }));
app.use(express.json());
app.get('/health', (_req, res) => {
res.json({ status: 'ok', timestamp: new Date().toISOString() });
});
app.listen(PORT, () => {
console.log(`Kaboot backend running on port ${PORT}`);
});

15
server/tsconfig.json Normal file
View file

@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"outDir": "dist",
"rootDir": "src",
"declaration": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}