mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 23:59:39 +02:00
Assorted changes from recent sessions: - .gitignore: add mana-sync binary, Forgejo data - chat/web: add isSidebarMode to navigation store - clock/web: fix alarm page markup - contacts/mukke/presi/questions: add svelte.config.js aliases - context/web: add missing dependency - manacore/landing: update pricing page - manacore/web + todo/web: update mana dashboard pages - planta/web: fix dashboard layout - pnpm-lock.yaml: cleanup after backend removals - docs/APP_GAP_ANALYSIS.md: new gap analysis doc - services/mana-analytics: add Dockerfile - services/mana-subscriptions: new Go subscription service Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
878 B
TypeScript
28 lines
878 B
TypeScript
export interface Config {
|
|
port: number;
|
|
databaseUrl: string;
|
|
manaAuthUrl: string;
|
|
serviceKey: string;
|
|
baseUrl: string;
|
|
stripe: { secretKey: string; webhookSecret: string };
|
|
cors: { origins: string[] };
|
|
}
|
|
|
|
export function loadConfig(): Config {
|
|
const env = (key: string, fallback?: string) => process.env[key] || fallback || '';
|
|
return {
|
|
port: parseInt(env('PORT', '3063'), 10),
|
|
databaseUrl: env(
|
|
'DATABASE_URL',
|
|
'postgresql://manacore:devpassword@localhost:5432/mana_subscriptions'
|
|
),
|
|
manaAuthUrl: env('MANA_CORE_AUTH_URL', 'http://localhost:3001'),
|
|
serviceKey: env('MANA_CORE_SERVICE_KEY', 'dev-service-key'),
|
|
baseUrl: env('BASE_URL', 'http://localhost:3063'),
|
|
stripe: {
|
|
secretKey: env('STRIPE_SECRET_KEY'),
|
|
webhookSecret: env('STRIPE_WEBHOOK_SECRET'),
|
|
},
|
|
cors: { origins: env('CORS_ORIGINS', 'http://localhost:5173').split(',') },
|
|
};
|
|
}
|