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
This commit is contained in:
@@ -183,11 +183,12 @@ app.get('*', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
|
const publicUrl = ENV === 'production' ? 'https://snatchgGameAdmin.interno.com' : `http://localhost:${PORT}`;
|
||||||
console.log(`
|
console.log(`
|
||||||
📊 SnatchGame Admin Dashboard
|
📊 SnatchGame Admin Dashboard
|
||||||
📱 Environment: ${ENV}
|
📱 Environment: ${ENV}
|
||||||
🌐 Server URL: http://localhost:${PORT}
|
🌐 Server URL: ${publicUrl}
|
||||||
🔗 Game Server: ${process.env.SERVER_URL}
|
🔗 Game Server: ${process.env.SERVER_URL}
|
||||||
📡 SSE Endpoint: http://localhost:${PORT}/api/sse
|
📡 SSE Endpoint: ${publicUrl}/api/sse
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
@@ -57,10 +57,11 @@ app.get('/api/config', (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.listen(PORT, () => {
|
app.listen(PORT, () => {
|
||||||
|
const publicUrl = ENV === 'production' ? 'https://snatchGame.interno.com' : `http://localhost:${PORT}`;
|
||||||
console.log(`
|
console.log(`
|
||||||
🎮 SnatchGame Client Server
|
🎮 SnatchGame Client Server
|
||||||
📱 Environment: ${ENV}
|
📱 Environment: ${ENV}
|
||||||
🌐 Server URL: http://localhost:${PORT}
|
🌐 Server URL: ${publicUrl}
|
||||||
🔗 Game Server: ${process.env.SERVER_URL}
|
🔗 Game Server: ${process.env.SERVER_URL}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user