From bf468ba8ae89b25e3d1c4c44b4bfe711ba0c2f7f Mon Sep 17 00:00:00 2001 From: "Mamadou Khoussa [028918 DSI/DAC/DIF/DS]" Date: Wed, 29 Oct 2025 12:47:01 +0000 Subject: [PATCH] fix port definition --- src/main.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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();