NestJS
├─src
│ ├─users
│ │ ├─users.module.ts
│ │ └─users.resolver.ts
│ ├─app.module.ts
│ └─main.ts
├─test
│ └─...test files
└─eslint,env,prettier etc config files
Last active
February 16, 2021 09:59
-
-
Save DillonMemo/a8ec34b2b43d3733edb141da776addcc to your computer and use it in GitHub Desktop.
set NestJS global scoped pipes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | |
await app.listen(3000); | |
} | |
bootstrap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment