import { ValidationPipe } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.setGlobalPrefix('api'); app.useGlobalPipes( new ValidationPipe({ whitelist: true, transform: true, forbidNonWhitelisted: true }), ); app.enableCors(); const port = process.env.PORT || 3100; await app.listen(port); console.log(`Ecom License Server running on http://localhost:${port}`); } bootstrap();