From 70cb8b5be13093d67ed248eeb73b5159ac8ad563 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Sat, 5 Jul 2025 16:29:50 -0600 Subject: [PATCH] fix: Display correct public URLs in production logs - Admin shows https://snatchgGameAdmin.interno.com in production - Client shows https://snatchGame.interno.com in production - SSE endpoint shows correct public URL for browser connections - Maintains localhost URLs for development environment --- admin/server.js | 5 +++-- client/server.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/server.js b/admin/server.js index c50ea8a..f595492 100644 --- a/admin/server.js +++ b/admin/server.js @@ -183,11 +183,12 @@ app.get('*', (req, res) => { }); app.listen(PORT, () => { + const publicUrl = ENV === 'production' ? 'https://snatchgGameAdmin.interno.com' : `http://localhost:${PORT}`; console.log(` 📊 SnatchGame Admin Dashboard 📱 Environment: ${ENV} -🌐 Server URL: http://localhost:${PORT} +🌐 Server URL: ${publicUrl} 🔗 Game Server: ${process.env.SERVER_URL} -📡 SSE Endpoint: http://localhost:${PORT}/api/sse +📡 SSE Endpoint: ${publicUrl}/api/sse `); }); \ No newline at end of file diff --git a/client/server.js b/client/server.js index c0c5576..a0d3a68 100644 --- a/client/server.js +++ b/client/server.js @@ -57,10 +57,11 @@ app.get('/api/config', (req, res) => { }); app.listen(PORT, () => { + const publicUrl = ENV === 'production' ? 'https://snatchGame.interno.com' : `http://localhost:${PORT}`; console.log(` 🎮 SnatchGame Client Server 📱 Environment: ${ENV} -🌐 Server URL: http://localhost:${PORT} +🌐 Server URL: ${publicUrl} 🔗 Game Server: ${process.env.SERVER_URL} `); }); \ No newline at end of file