From f007a7cd93750033f53deb42df9ec2fd68cecb7c Mon Sep 17 00:00:00 2001 From: AhmedFatthy1040 Date: Tue, 3 Dec 2024 01:14:16 +0200 Subject: [PATCH] refactor(api): update server configuration for Docker - Configure server to listen on all interfaces (0.0.0.0) - Add fallback port 5000 for development - Improve logging for container startup --- api/src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/server.ts b/api/src/server.ts index 168a773..27fe863 100644 --- a/api/src/server.ts +++ b/api/src/server.ts @@ -3,8 +3,8 @@ import dotenv from 'dotenv'; dotenv.config(); -const PORT = process.env.PORT || 5000; +const PORT = parseInt(process.env.PORT || '5000', 10); -app.listen(PORT, () => { +app.listen(PORT, '0.0.0.0', () => { console.log(`API running on port ${PORT}`); });