diff --git a/src/main.ts b/src/main.ts index 8e78a74e6..d588075a2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,8 @@ import { ConfigService } from '@nestjs/config'; import { SERVER_PORT } from './config/constants'; async function bootstrap() { -const app = await NestFactory.create(AppModule, { cors: true }); +const app = await NestFactory.create(AppModule); + app.enableCors() const configService = app.get(ConfigService); const port = configService.get(SERVER_PORT); await app.listen(port);