Spaces:
Sleeping
Sleeping
Commit ·
153e730
1
Parent(s): 8349c69
Fix server.js: add HOST 0.0.0.0 for HF deployment
Browse files
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 |
-
|
| 6 |
-
|
| 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 |
+
});
|