lilith-platform.live/codebase/@features/client-intel/backend-api/src/main.ts
Claude Code 3f88a9604a feat(client-intel): Implement client intelligence backend API with health check endpoints
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-10 01:46:08 -07:00

32 lines
841 B
TypeScript

import 'reflect-metadata';
import { NestFactory } from '@nestjs/core';
import { ValidationPipe, Logger } from '@nestjs/common';
import { AppModule } from './app.module';
const logger = new Logger('Bootstrap');
async function bootstrap(): Promise<void> {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api/client-intel');
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
forbidNonWhitelisted: true,
transform: true,
}),
);
const port = parseInt(process.env['PORT'] ?? '3027', 10);
await app.listen(port, '127.0.0.1');
logger.log(`Client Intel API listening on port ${port}`);
}
bootstrap().catch((err: unknown) => {
new Logger('Bootstrap').error(
'Failed to start application',
err instanceof Error ? err.stack : String(err),
);
process.exit(1);
});