Skip to content

Instantly share code, notes, and snippets.

@Vivek205
Created October 4, 2022 11:22
Show Gist options
  • Save Vivek205/a9fa331177f027e2b652413fafec2ed9 to your computer and use it in GitHub Desktop.
Save Vivek205/a9fa331177f027e2b652413fafec2ed9 to your computer and use it in GitHub Desktop.
NestJs sample app; entry file
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.useGlobalPipes(
new ValidationPipe({
validationError: {
value: true,
},
}),
);
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment