feat: Update API and WebSocket URLs to use environment variables for better configuration
This commit is contained in:
@@ -22,8 +22,8 @@ function App() {
|
||||
}, [connect]);
|
||||
|
||||
const renderPanelContent = () => {
|
||||
const apiUrl = 'http://localhost:3001';
|
||||
const wsUrl = 'ws://localhost:3002';
|
||||
const apiUrl = import.meta.env.VITE_API_URL || `${window.location.protocol}//${window.location.host}/api`;
|
||||
const wsUrl = import.meta.env.VITE_WS_URL || `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`;
|
||||
|
||||
switch (panelTab) {
|
||||
case 'control':
|
||||
|
||||
Reference in New Issue
Block a user