Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
dbruidb authored Mar 13, 2024
1 parent 29bd729 commit 164ea68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>(SERVER_PORT);
await app.listen(port);
Expand Down

0 comments on commit 164ea68

Please sign in to comment.