fix(dev): point SPA API proxy at server:8080 not 4301 #382
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dev-server-proxy-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
While smoke-testing on the live dev stack, every screen was slow and no data loaded or saved. The dx dev-server logs showed a flood of:
ERROR Proxy error: Backend not ready after 30s: Connection refused (os error 111)on every/api/v1/*request.Root cause
The
[[web.proxy]]backend inDioxus.tomltargetedhttp://server:4301/api/, but the mokosh-server container listens on its$MOKOSH_PORT(8080). Port 4301 is the SPA dev-server's own port, not the API port. So the proxy connected to a port nothing was listening on, got connection-refused, and timed out after 30s. Net effect: the SPA could not reach the backend at all, so lists 500'd and form saves (including the Billable / timesheet-certify checkboxes that were under investigation) silently failed.Verified from the apps container:
wget http://server:8080/api/v1/healthreturns OK;server:4301is refused.Fix
Point the proxy at
http://server:8080/api/to match the server's actual listen port. Comment updated to record that 8080 is the API port and 4301 is the SPA dev port.Note
This unblocks in-browser testing of the merged PMS-571 checkbox fix (#381): the checkboxes appeared broken in part because no save request was reaching the backend. With the proxy corrected we can finally observe the real checkbox behavior.