Refactor proxy and environment handling #3

Merged
probablycorey merged 1 commits from probablycorey/refactor-proxy-fetch into main 2026-03-11 17:39:10 +00:00

1 Commits

Author SHA1 Message Date
48a5fbdea7 Refactor proxy and environment handling
- Separate /ok health check from proxy logic into dedicated healthCheck function
- Fix WebSocket message race condition by buffering messages until upstream connects
- Add 5s timeout for WebSocket upstream connection
- Create env.ts for centralized env var handling and validation
- Move exports to top of files for better discoverability
- Remove spawn() parameter and have it read from env.ts
- Remove unused validation logic (now handled by env.ts)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-11 10:38:10 -07:00