From 992ccf056bb45df29093dec536f024f955f1d07d Mon Sep 17 00:00:00 2001 From: salvacybersec Date: Tue, 11 Nov 2025 07:37:27 +0300 Subject: [PATCH] bind --- backend/src/app.js | 11 ++++++----- docker-compose.yml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/src/app.js b/backend/src/app.js index 3ab3f2f..e9f13e8 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -133,14 +133,15 @@ const startServer = async () => { // Test database connection await testConnection(); - // Start listening - app.listen(PORT, () => { + // Start listening on all interfaces (0.0.0.0) to allow remote access + app.listen(PORT, '0.0.0.0', () => { logger.info(`šŸš€ Server is running on port ${PORT}`); logger.info(`šŸ“Š Environment: ${process.env.NODE_ENV || 'development'}`); - logger.info(`šŸ”— Health check: http://localhost:${PORT}/health`); + logger.info(`šŸ”— Health check: http://0.0.0.0:${PORT}/health`); console.log(`\n✨ Oltalama Backend Server Started!`); - console.log(`🌐 API: http://localhost:${PORT}/api`); - console.log(`šŸŽÆ Tracking: http://localhost:${PORT}/t/:token\n`); + console.log(`🌐 API: http://0.0.0.0:${PORT}/api`); + console.log(`šŸŽÆ Tracking: http://0.0.0.0:${PORT}/t/:token`); + console.log(`šŸŒ Server listening on all interfaces (0.0.0.0:${PORT})\n`); }); } catch (error) { logger.error('Failed to start server:', error); diff --git a/docker-compose.yml b/docker-compose.yml index c1083fa..f3932c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: dockerfile: Dockerfile container_name: oltalama ports: - - "3000:3000" + - "0.0.0.0:3000:3000" environment: - NODE_ENV=production - PORT=3000