ваше сообщение коммита

This commit is contained in:
2025-04-21 10:40:57 +03:00
parent 483a1ef854
commit 5a8e62924c
20 changed files with 637 additions and 84 deletions

View File

@@ -7,7 +7,9 @@ import router from './router';
import axios from 'axios';
// Настройка axios
axios.defaults.baseURL = import.meta.env.VITE_API_URL || '';
// В Docker контейнере localhost:8000 не работает, поэтому используем явное значение
const apiUrl = window.location.hostname === 'localhost' ? 'http://localhost:8000' : import.meta.env.VITE_API_URL;
axios.defaults.baseURL = apiUrl;
axios.defaults.withCredentials = true;
// Создаем и монтируем приложение Vue
@@ -25,7 +27,7 @@ app.use(router);
// ]).catch(err => console.error('Failed to load API mocks:', err));
// }
console.log('API URL:', import.meta.env.VITE_API_URL);
console.log('API URL:', apiUrl);
console.log('main.js: Starting application with router');
app.mount('#app');