Mercurial
view react_games/backend/server.ts @ 260:1f9877b637e9
Add Copilot-powered cyberpunk JRPG chat
Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | fb9bcd3145cb |
| children |
line wrap: on
line source
import express from 'express'; import path from 'node:path'; import { createTodoRouter } from './routes/todo'; import { createWebRouter } from './routes/web'; import { createWorldeRouter } from './routes/wordle'; const app = express(); app.use(express.json()); const ROOT = process.cwd(); const PUBLIC_DIR = path.resolve(ROOT, 'public'); const DATA_FILE = path.resolve(ROOT, 'data', 'todos.json'); const PORT = Number(process.env.PORT) || 4000; const SPA_MOUNTS = [ { baseUrl: '/games', entryHtml: 'games/index.html' }, ]; app.use('/api/v1/todo', createTodoRouter(DATA_FILE)); app.use('/api/v1/wordle', createWorldeRouter()); app.use('/', createWebRouter(PUBLIC_DIR, SPA_MOUNTS)); app.listen(PORT, () => { console.log(`→ http://localhost:${PORT}`); });