mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-21 12:46:42 +02:00
refactor: consolidate codebase — remove archived code, deduplicate packages, standardize middleware
- 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>
This commit is contained in:
parent
7ee57b7afd
commit
d8ce4eaf34
309 changed files with 172 additions and 21667 deletions
|
|
@ -1,5 +1,6 @@
|
|||
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);
|
||||
|
|
@ -7,12 +8,8 @@ const CORS_ORIGINS = (process.env.CORS_ORIGINS || 'http://localhost:5173').split
|
|||
|
||||
const app = new Hono();
|
||||
|
||||
app.onError((err, c) => {
|
||||
console.error('Unhandled error:', err);
|
||||
return c.json({ error: 'Internal server error' }, 500);
|
||||
});
|
||||
|
||||
app.notFound((c) => c.json({ error: 'Not found' }, 404));
|
||||
app.onError(errorHandler);
|
||||
app.notFound(notFoundHandler);
|
||||
|
||||
app.use('*', cors({ origin: CORS_ORIGINS, credentials: false }));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue