mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 13:49:41 +02:00
All standalone SvelteKit web apps have been superseded by the unified ManaCore app (apps/manacore/apps/web). Moved to web-archived/ within each project to preserve history while removing from active workspace. Archived: calc, cards, chat, citycorners, contacts, context, guides, inventar, moodlit, mukke, news, nutriphi, photos, picture, planta, presi, questions, skilltree, storage, times, zitare, todo, calendar, uload, memoro Moved to apps-archived/: wisekeep (not integrated, inactive) Kept active: manacore (unified), matrix, manavoxel, arcade (separate containers) Server, landing, and package directories remain active for each project. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
869 B
TypeScript
30 lines
869 B
TypeScript
export interface Config {
|
|
port: number;
|
|
databaseUrl: string;
|
|
manaAuthUrl: string;
|
|
cors: { origins: string[] };
|
|
groqApiKey: string;
|
|
whisperModel: string;
|
|
}
|
|
|
|
export function loadConfig(): Config {
|
|
const requiredEnv = (key: string, fallback?: string): string => {
|
|
const value = process.env[key] || fallback;
|
|
if (!value) throw new Error(`Missing required env var: ${key}`);
|
|
return value;
|
|
};
|
|
|
|
return {
|
|
port: parseInt(process.env.PORT || '3072', 10),
|
|
databaseUrl: requiredEnv(
|
|
'DATABASE_URL',
|
|
'postgresql://manacore:devpassword@localhost:5432/mana_sync'
|
|
),
|
|
manaAuthUrl: requiredEnv('MANA_CORE_AUTH_URL', 'http://localhost:3001'),
|
|
cors: {
|
|
origins: (process.env.CORS_ORIGINS || 'http://localhost:5173').split(','),
|
|
},
|
|
groqApiKey: process.env.GROQ_API_KEY || '',
|
|
whisperModel: process.env.WHISPER_MODEL || 'whisper-large-v3-turbo',
|
|
};
|
|
}
|