Improved & fixed some issues with JWT authentication.
This commit is contained in:
@ -1,10 +1,16 @@
|
||||
import * as cookieParser from 'cookie-parser';
|
||||
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.use(cookieParser());
|
||||
app.useGlobalPipes(new ValidationPipe({
|
||||
stopAtFirstError: true,
|
||||
whitelist: true,
|
||||
transform: true,
|
||||
}));
|
||||
await app.listen(process.env.PORT ?? 3001);
|
||||
}
|
||||
bootstrap();
|
||||
|
Reference in New Issue
Block a user