Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -165,11 +165,15 @@ app.get('/:userConf/stream/:type/:id.json', async function (req, res) {
|
|
| 165 |
}
|
| 166 |
});
|
| 167 |
|
|
|
|
| 168 |
// Listen for incoming requests
|
| 169 |
if (module.parent) {
|
| 170 |
module.exports = app;
|
| 171 |
} else {
|
| 172 |
-
|
| 173 |
-
|
|
|
|
|
|
|
| 174 |
});
|
| 175 |
}
|
|
|
|
|
|
| 165 |
}
|
| 166 |
});
|
| 167 |
|
| 168 |
+
// Listen for incoming requests
|
| 169 |
// Listen for incoming requests
|
| 170 |
if (module.parent) {
|
| 171 |
module.exports = app;
|
| 172 |
} else {
|
| 173 |
+
// Bind to 0.0.0.0 and use the configured port
|
| 174 |
+
app.listen(config.port, '0.0.0.0', function () {
|
| 175 |
+
console.log(`Server started: ${config.addon}`);
|
| 176 |
+
console.log(`Listening on: ${config.local} (${config.port})`);
|
| 177 |
});
|
| 178 |
}
|
| 179 |
+
|