INNER CODE UNIT · TypeScript
bootstrap
andrechristikan/ack-nestjs-boilerplate · src/main.ts:11
async function bootstrap(): Promise<void> {
let app: NestApplication = await NestFactory.create(AppModule, {
abortOnError: true,
bufferLogs: true,
bodyParser: false,
routeConflictPolicy: { duplicate: 'error', shadow: 'error' },
routeResolutionStrategy: 'specificity',
});
app.useLogger(app.get(PinoLogger));
const configService = app.get(ConfigService);
const env: string = configService.get<string>('app.env')!;
const timezone: string = configService.get<string>('app.timezone')!;
const host: string = configService.get<string>('app.http.host')!;
const port: number = configService.get<number>('app.http.port')!;
const trustedProxy: string | null = configService.get<string | null>(
'app.http.trustedProxy'