chore: added nestjs version into auth module

This commit is contained in:
Balu Babu
2023-02-01 19:19:39 +05:30
parent b5e7877912
commit a1be3a3e77
3 changed files with 21 additions and 17 deletions

View File

@@ -2,6 +2,7 @@ import { NestFactory } from '@nestjs/core';
import { json } from 'express';
import { AppModule } from './app.module';
import * as cookieParser from 'cookie-parser';
import { VersioningType } from '@nestjs/common';
async function bootstrap() {
console.log(`Running in production: ${process.env.PRODUCTION}`);
@@ -31,6 +32,9 @@ async function bootstrap() {
origin: true,
});
}
app.enableVersioning({
type: VersioningType.URI,
});
app.use(cookieParser(process.env.SIGNED_COOKIE_SECRET));
await app.listen(process.env.PORT || 3170);
}