prepare the server

This commit is contained in:
Sven Czarnian
2022-10-22 17:19:20 +02:00
parent 5718d6bcf8
commit 31c9739d38
3 changed files with 22 additions and 0 deletions

View File

@@ -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();