import { NestFactory } from '@nestjs/core' ; import { AppModule } from './app.module' ; async function bootstrap ( ) { const app = await NestFactory . create ( AppModule ) ; if ( process . env . NODE_ENV !== 'production' ) { app . getHttpAdapter ( ) . getInstance ( ) . set ( 'json spaces' , 2 ) ; } await app . listen ( 3001 ) ; } bootstrap ( ) ;