one port
Build and Push Docker Images / build-and-push (push) Successful in 32s

This commit is contained in:
2025-08-21 13:13:47 +02:00
parent c27a2e542a
commit c2b01c14ed
2 changed files with 6 additions and 10 deletions
+5 -8
View File
@@ -245,18 +245,15 @@ app.post('/publish/:topic', authenticateApiKey, (req, res) => {
// Start servers
const WS_PORT = process.env.WS_PORT || 3000;
const API_PORT = process.env.API_PORT || 8080;
const API_PORT = process.env.WS_PORT || 3000; // Use same port for both
// Start WebSocket server
io.listen(WS_PORT);
console.log(`WebSocket server running on port ${WS_PORT}`);
// Start HTTP API server
app.listen(API_PORT, () => {
console.log(`HTTP API server running on port ${API_PORT}`);
// Start HTTP API server (Socket.IO will be served on the same port)
server.listen(API_PORT, () => {
console.log(`HTTP API and WebSocket server running on port ${API_PORT}`);
console.log(`Health check: http://localhost:${API_PORT}/health`);
console.log(`Topics: http://localhost:${API_PORT}/topics`);
console.log(`Publish: POST http://localhost:${API_PORT}/publish`);
console.log(`WebSocket connections: ws://localhost:${API_PORT}`);
console.log(`API Key configured: ${API_KEY !== 'default-api-key-change-me' ? 'Yes' : 'No (using default)'}`);
if (API_KEY === 'default-api-key-change-me') {
console.log(`⚠️ WARNING: Using default API key. Set API_KEY environment variable for production!`);