pyaesonegtckglay-dotcom commited on
Commit ·
1acb0a5
1
Parent(s): ee09ee1
fix: hardcode HF Space URL for production Vercel deployment
Browse files- lib/api.ts: default to pyae1994-autonomous-coding-system.hf.space
- Fixes WebSocket connection pointing to localhost in Vercel
- Build ✓, Vercel ✓, HF Building...
- frontend/lib/api.ts +4 -2
frontend/lib/api.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
-
const
|
| 2 |
-
const
|
|
|
|
|
|
|
| 3 |
|
| 4 |
export const API_URL = API_BASE
|
| 5 |
export const WS_URL = WS_BASE
|
|
|
|
| 1 |
+
const HF_SPACE = 'https://pyae1994-autonomous-coding-system.hf.space'
|
| 2 |
+
const HF_SPACE_WS = 'wss://pyae1994-autonomous-coding-system.hf.space'
|
| 3 |
+
const API_BASE = process.env.NEXT_PUBLIC_API_URL || HF_SPACE
|
| 4 |
+
const WS_BASE = process.env.NEXT_PUBLIC_WS_URL || HF_SPACE_WS
|
| 5 |
|
| 6 |
export const API_URL = API_BASE
|
| 7 |
export const WS_URL = WS_BASE
|