import 'reflect-metadata'; import { Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module.js'; async function bootstrap(): Promise { const app = await NestFactory.create(AppModule, { bufferLogs: true }); const config = app.get(ConfigService); const logger = new Logger('Bootstrap'); await app.init(); const port = config.get('CONTENT_INGESTOR_HEALTH_PORT', 3825); await app.listen(port, '0.0.0.0'); logger.log( `content-ingestor running, health on :${port} ` + `(poll ${config.get('INGEST_POLL_INTERVAL_MS', 300000)}ms, env=${config.get('NODE_ENV') ?? 'development'})`, ); } bootstrap().catch((err: unknown) => { const logger = new Logger('Bootstrap'); logger.error('Fatal bootstrap error', err instanceof Error ? err.stack : String(err)); process.exit(1); });