This commit is contained in:
salvacybersec
2025-11-11 07:37:27 +03:00
parent 282b7f7877
commit 992ccf056b
2 changed files with 7 additions and 6 deletions

View File

@@ -133,14 +133,15 @@ const startServer = async () => {
// Test database connection // Test database connection
await testConnection(); await testConnection();
// Start listening // Start listening on all interfaces (0.0.0.0) to allow remote access
app.listen(PORT, () => { app.listen(PORT, '0.0.0.0', () => {
logger.info(`🚀 Server is running on port ${PORT}`); logger.info(`🚀 Server is running on port ${PORT}`);
logger.info(`📊 Environment: ${process.env.NODE_ENV || 'development'}`); 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(`\n✨ Oltalama Backend Server Started!`);
console.log(`🌐 API: http://localhost:${PORT}/api`); console.log(`🌐 API: http://0.0.0.0:${PORT}/api`);
console.log(`🎯 Tracking: http://localhost:${PORT}/t/:token\n`); 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) { } catch (error) {
logger.error('Failed to start server:', error); logger.error('Failed to start server:', error);

View File

@@ -5,7 +5,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: oltalama container_name: oltalama
ports: ports:
- "3000:3000" - "0.0.0.0:3000:3000"
environment: environment:
- NODE_ENV=production - NODE_ENV=production
- PORT=3000 - PORT=3000