feat: Update API and WebSocket URLs to use environment variables for better configuration

This commit is contained in:
MayaTheShy
2026-02-20 01:28:41 -05:00
parent 0eac9497de
commit 75b2088b4f

View File

@@ -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':