feat: ✨ useGlobalValidationPipe with whitelist
This commit is contained in:
parent
577d96d68c
commit
d4a9519cbf
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user