diff --git a/backend/src/app.js b/backend/src/app.js index a7967aa..47cd9f2 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -153,14 +153,14 @@ const startServer = async () => { // Test database connection await testConnection(); - // Start listening - app.listen(PORT, () => { + // Start listening on all interfaces (0.0.0.0) + 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\n`); }); } catch (error) { logger.error('Failed to start server:', error); diff --git a/deploy.sh b/deploy.sh index 1038652..b5c655a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -435,8 +435,8 @@ module.exports = { { name: 'oltalama-frontend', cwd: '/opt/oltalama/frontend', - script: 'npm', - args: 'run preview', + script: 'node_modules/.bin/vite', + args: 'preview --host 0.0.0.0 --port 4173', instances: 1, exec_mode: 'fork', watch: false,