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]);
|
}, [connect]);
|
||||||
|
|
||||||
const renderPanelContent = () => {
|
const renderPanelContent = () => {
|
||||||
const apiUrl = 'http://localhost:3001';
|
const apiUrl = import.meta.env.VITE_API_URL || `${window.location.protocol}//${window.location.host}/api`;
|
||||||
const wsUrl = 'ws://localhost:3002';
|
const wsUrl = import.meta.env.VITE_WS_URL || `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`;
|
||||||
|
|
||||||
switch (panelTab) {
|
switch (panelTab) {
|
||||||
case 'control':
|
case 'control':
|
||||||
|
|||||||
Reference in New Issue
Block a user