hunk.code_window: import { InboundParseQueueService } from './services/inbound-parse.queue.service';
   import { InboundParseController } from './inbound-parse.controller';
   import { GetMxRecord } from './usecases/get-mx-record/get-mx-record.usecase';
   import { SharedModule } from '../shared/shared.module';
   import { AuthModule } from '../auth/auth.module';
  
hunk.labels: keep keep keep keep add keep
hunk.after_edit: import { CompileTemplate } from '@novu/application-generic';
  
hunk.file_path: apps/api/src/app/inbound-parse/inbound-parse.module.ts
hunk.type: add
file: import './config';
  import 'newrelic';
  import { NestFactory } from '@nestjs/core';
  import * as Sentry from '@sentry/node';
  import { RedisIoAdapter } from './shared/framework/redis.adapter';
  
  import { AppModule } from './app.module';
  import { CONTEXT_PATH } from './config';
  import helmet from 'helmet';
  import { BullmqService } from '@novu/application-generic';
  import { version } from '../package.json';
  import { getErrorInterceptor, Logger } from '@novu/application-generic';
  
  if (process.env.SENTRY_DSN) {
    Sentry.init({
      dsn: process.env.SENTRY_DSN,
      environment: process.env.NODE_ENV,
      release: `v${version}`,
    });
  }
  
  export async function bootstrap() {
    BullmqService.haveProInstalled();
    const app = await NestFactory.create(AppModule, { bufferLogs: true });
    const redisIoAdapter = new RedisIoAdapter(app);
  
    app.useLogger(app.get(Logger));
    app.flushLogs();
  
    app.useGlobalInterceptors(getErrorInterceptor());
  
    app.setGlobalPrefix(CONTEXT_PATH);
  
    app.use(helmet());
  
    app.enableCors({
      origin: '*',
      preflightContinue: false,
      allowedHeaders: ['Content-Type', 'Authorization'],
      methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
    });
  
    app.useWebSocketAdapter(redisIoAdapter);
  
    await app.listen(process.env.PORT as string);
  }
  