mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 03:09:40 +02:00
Adds the services/news-ingester Bun service that pulls 25 public RSS/JSON feeds into news.curated_articles every 15 min, with Mozilla Readability fallback for thin RSS bodies and 30-day retention. apps/api /feed is rewritten to read from the new pool table directly instead of the sync_changes hack, with topics/lang/since/limit/offset query params. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
622 B
TypeScript
21 lines
622 B
TypeScript
/**
|
|
* Environment-driven config. Defaults match the local dev setup
|
|
* (`pnpm setup:env` writes the same DATABASE_URL into .env files).
|
|
*/
|
|
|
|
export interface Config {
|
|
port: number;
|
|
databaseUrl: string;
|
|
tickIntervalMs: number;
|
|
runOnStartup: boolean;
|
|
}
|
|
|
|
export function loadConfig(): Config {
|
|
return {
|
|
port: parseInt(process.env.PORT || '3066', 10),
|
|
databaseUrl:
|
|
process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
|
|
tickIntervalMs: parseInt(process.env.TICK_INTERVAL_MS || '900000', 10), // 15 min
|
|
runOnStartup: (process.env.RUN_ON_STARTUP || 'true') !== 'false',
|
|
};
|
|
}
|