import { NestFactory } from '@nestjs/core';
import { Logger } from '@nestjs/common';
import { AppModule } from './app.module';

async function bootstrap() {
  const logger = new Logger('ProcessorService');
  const app = await NestFactory.create(AppModule);

  const port = process.env.PORT ?? 3002;
  await app.listen(port);

  logger.log(`Analytics processor service running on port ${port}`);
}

bootstrap();
