diff --git a/src/main.ts b/src/main.ts index f825114..29c5dc3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,11 +25,12 @@ async function bootstrap() { app.getHttpAdapter().get('/api/swagger-json', (req, res) => { res.json(document); }); - - await app.listen(process.env.PORT ?? 3000); - console.log(`Application is running on: http://localhost:3000`); - console.log(`Swagger docs: http://localhost:3000/api/docs`); - console.log(`Swagger content: http://localhost:3000/api/swagger-json`); + const port = process.env.PORT || 3000; + await app.listen(port); + + console.log(`Application is running on: http://localhost:${port}`); + console.log(`Swagger docs: http://localhost:${port}/api/docs`); + console.log(`Swagger docs: http://localhost:${port}/api/swagger-json`); } bootstrap();