This commit is contained in:
2026-05-16 01:59:23 +03:00
parent 77d396b842
commit be2a17c36b
2 changed files with 4 additions and 3 deletions

View File

@@ -41,8 +41,8 @@ function showToast(message, type = 'info') {
}
function initSocket() {
// Подключаемся к текущему хосту (без хардкода localhost)
socket = io();
// Подключаемся напрямую к бэкенду на порту 5000
try { socket = io(`http://${window.location.hostname}:5000`); } catch(e) { console.warn('Socket.IO:', e.message); return; }
socket.on('connect', () => {
console.log('Connected to WebSocket server');