mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 11:41:23 +02:00
- Delete 17 server-archived/ directories (consolidated into apps/api/) - Delete apps-archived/ (clock, wisekeep) and services-archived/ (it-landing, ollama-metrics-proxy) - Fix type safety: replace all `any` casts in cross-app-queries.ts with proper Local* types - Remove duplicate shared-auth-stores package (identical copy of shared-auth-ui/stores/) - Remove duplicate theme store from shared-stores (canonical version in shared-theme) - Migrate memoro-server rate-limiter to shared-hono/rateLimitMiddleware - Migrate uload-server JWT auth + error handler to shared-hono (authMiddleware, errorHandler) - Migrate arcade-server error handling to shared-hono - Merge shared-profile-ui and shared-app-onboarding into shared-ui - Unify /clock route into /times/clock, remove redirect stubs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
749 B
TypeScript
24 lines
749 B
TypeScript
import { Hono } from 'hono';
|
|
import { cors } from 'hono/cors';
|
|
import { errorHandler, notFoundHandler } from '@manacore/shared-hono';
|
|
import { gamesRoutes } from './routes/games';
|
|
|
|
const PORT = parseInt(process.env.PORT || '3011', 10);
|
|
const CORS_ORIGINS = (process.env.CORS_ORIGINS || 'http://localhost:5173').split(',');
|
|
|
|
const app = new Hono();
|
|
|
|
app.onError(errorHandler);
|
|
app.notFound(notFoundHandler);
|
|
|
|
app.use('*', cors({ origin: CORS_ORIGINS, credentials: false }));
|
|
|
|
app.get('/health', (c) =>
|
|
c.json({ status: 'ok', timestamp: new Date().toISOString(), service: 'arcade-server' })
|
|
);
|
|
|
|
app.route('/api/games', gamesRoutes);
|
|
|
|
console.log(`Arcade server running on http://localhost:${PORT}`);
|
|
|
|
export default { port: PORT, fetch: app.fetch };
|