Huzaifa1435 commited on
Commit
153e730
·
1 Parent(s): 8349c69

Fix server.js: add HOST 0.0.0.0 for HF deployment

Browse files
Files changed (1) hide show
  1. server.js +7 -4
server.js CHANGED
@@ -1,7 +1,10 @@
1
  require('dotenv').config();
2
  const app = require('./src/app');
3
 
4
- const PORT = process.env.PORT || 7860;
5
- app.listen(PORT, () => {
6
- console.log(`CarPool backend running on port ${PORT}`);
7
- });
 
 
 
 
1
  require('dotenv').config();
2
  const app = require('./src/app');
3
 
4
+ const PORT = Number(process.env.PORT || 7860);
5
+ const HOST = '0.0.0.0';
6
+
7
+ app.listen(PORT, HOST, () => {
8
+ console.log(`🚀 CarPool backend running at http://${HOST}:${PORT}`);
9
+ console.log(`🔗 Health endpoint: http://${HOST}:${PORT}/health`);
10
+ });