From af56fa95e5284b488b7cbdc5eac3a66c2ccd2b0f Mon Sep 17 00:00:00 2001 From: Zaur Abdulgalimov Date: Thu, 20 Jul 2023 17:13:32 +0300 Subject: [PATCH] enable cors --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index aea30c4..06db0e3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,6 +8,8 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); const config: ConfigService = app.get(ConfigService); + app.enableCors(); + const port = config.get('port'); await app.listen(port); console.log(`Application start on port: ${port}`);