Local serving optimizations and Windows docs updates

This commit is contained in:
Jack Kingsman
2026-03-02 20:19:49 -08:00
parent d9aa67d254
commit 7d39e726b4
3 changed files with 24 additions and 5 deletions
+1 -5
View File
@@ -49,11 +49,7 @@ export function useWebSocket(options: UseWebSocketOptions) {
const connect = useCallback(() => {
// Determine WebSocket URL based on current location
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
// In development, connect directly to backend; in production, use same host
const isDev = window.location.port === '5173';
const wsUrl = isDev
? `ws://localhost:8000/api/ws`
: `${protocol}//${window.location.host}/api/ws`;
const wsUrl = `${protocol}//${window.location.host}/api/ws`;
const ws = new WebSocket(wsUrl);