Clean successor to V3 (forge: lilith/atlilith). Seeded from local Mac working tree at ~/Code/@projects/@cocottetech/. node_modules and build artifacts excluded via .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
907 B
TypeScript
28 lines
907 B
TypeScript
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<void> {
|
|
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<number>('CACHE_REBUILDER_HEALTH_PORT', 3824);
|
|
await app.listen(port, '0.0.0.0');
|
|
|
|
logger.log(
|
|
`cache-rebuilder running, health on :${port}, subscribed to '${config.get<string>('REDIS_CACHE_INVALIDATE_CHANNEL', 'platform.cache.invalidate')}'`,
|
|
);
|
|
}
|
|
|
|
bootstrap().catch((err: unknown) => {
|
|
const logger = new Logger('Bootstrap');
|
|
logger.error('Fatal bootstrap error', err instanceof Error ? err.stack : String(err));
|
|
process.exit(1);
|
|
});
|