prepare the server
This commit is contained in:
		| @@ -1,8 +1,15 @@ | ||||
| import { NestFactory } from '@nestjs/core'; | ||||
| import { ValidationPipe } from '@nestjs/common'; | ||||
| import helmet from 'helmet'; | ||||
| import { AppModule } from './app.module'; | ||||
|  | ||||
| async function bootstrap() { | ||||
|   const app = await NestFactory.create(AppModule); | ||||
|  | ||||
|   app.use(helmet()); | ||||
|   app.enableCors(); | ||||
|   app.useGlobalPipes(new ValidationPipe({ whitelist: true })); | ||||
|  | ||||
|   await app.listen(3000); | ||||
| } | ||||
| bootstrap(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user