feat: useGlobalValidationPipe with whitelist

This commit is contained in:
2024-02-27 16:46:11 +01:00
parent 577d96d68c
commit d4a9519cbf

View File

@@ -1,8 +1,14 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { ValidationPipe } from "@nestjs/common";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
}),
);
await app.listen(3333);
}
bootstrap();