import { NestFactory } from '@nestjs/core' ; import { ValidationPipe } from '@nestjs/common' ; import { AppModule } from './app.module' ; async function bootstrap ( ) { const app = await NestFactory . create ( AppModule ) ; app . setGlobalPrefix ( 'api' ) ; app . enableCors ( ) ; app . useGlobalPipes ( new ValidationPipe ( { transform : true , whitelist : true , forbidNonWhitelisted : true , } ) ) ; await app . listen ( 5600 ) ; } bootstrap ( ) ;