import { NestFactory, Reflector } from "@nestjs/core"; import { AppModule } from "./app.module"; import { ClassSerializerInterceptor, ValidationPipe } from "@nestjs/common"; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors({ origin: "*", }); app.useGlobalPipes(new ValidationPipe()); app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector), { excludeExtraneousValues: true, })); await app.listen(process.env.PORT ?? 3000, "0.0.0.0"); } bootstrap();