Skip to content

Commit

Permalink
refactor(api): update server configuration for Docker
Browse files Browse the repository at this point in the history
- Configure server to listen on all interfaces (0.0.0.0)
- Add fallback port 5000 for development
- Improve logging for container startup
  • Loading branch information
AhmedFatthy1040 committed Dec 2, 2024
1 parent e2a52d6 commit f007a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
});

0 comments on commit f007a7c

Please sign in to comment.