new file: frontend/nginx.conf
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// frontend/js/api.js
|
||||
const API_BASE = "http://localhost:5000/api";
|
||||
const API_BASE = "/api";
|
||||
|
||||
function getHeaders() {
|
||||
const token = localStorage.getItem('token');
|
||||
|
||||
@@ -41,7 +41,8 @@ function showToast(message, type = 'info') {
|
||||
}
|
||||
|
||||
function initSocket() {
|
||||
socket = io('http://localhost:5000');
|
||||
// Подключаемся к текущему хосту (без хардкода localhost)
|
||||
socket = io();
|
||||
|
||||
socket.on('connect', () => {
|
||||
console.log('Connected to WebSocket server');
|
||||
|
||||
Reference in New Issue
Block a user