fix(server): bind to 0.0.0.0; set BIND_HOST for Docker/runtime to expose port

This commit is contained in:
Inside4ndroid
2025-09-17 12:00:13 +01:00
parent 0e9f6d92e4
commit 25acff24a7
3 changed files with 8 additions and 2 deletions
+6 -2
View File
@@ -374,8 +374,12 @@ app.get('/api/streams/:provider/:type/:tmdbId', async (req,res) => {
});
const PORT = config.port;
const server = app.listen(PORT, () => {
console.log(`TMDB Embed REST API listening on http://localhost:${PORT}`);
const HOST = process.env.BIND_HOST || '0.0.0.0';
const server = app.listen(PORT, HOST, () => {
console.log(`TMDB Embed REST API listening on http://${HOST}:${PORT}`);
if (HOST !== 'localhost') {
console.log(`Local access (if running on your machine): http://localhost:${PORT}`);
}
console.log('Endpoints:');
console.log(' GET /api/health');
console.log(' GET /api/metrics');