Skip to content

feat(const): point the hub at another codev-backend with CODEV_BACKEND_URL - #258

Merged
quickbeard merged 2 commits into
mainfrom
feat/backend-url-override
Aug 26, 2026
Merged

feat(const): point the hub at another codev-backend with CODEV_BACKEND_URL#258
quickbeard merged 2 commits into
mainfrom
feat/backend-url-override

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Adds an env override so a developer can point CoDev Hub at a codev-backend running somewhere else — a local one (bun dev in that repo serves http://127.0.0.1:8787), or a staging deploy.

exportconstBACKEND_URL=process.env.CODEV_BACKEND_URL||`${BASE_URL}/codev-backend`;

Why an override rather than editing the URL

Testing a backend change end-to-end previously meant editing the baked BACKEND_URL and remembering to put it back. A 127.0.0.1 that slips into a commit points every user's hub at their own machine — a silent, total sign-in outage, and one that would look like a network problem rather than a bad release. Unset, this is inert: the baked URL is exactly what ships.

SSO is deliberately not overridable

Only the exchange moves. A locally-run backend still verifies tokens against the real SSO_USERINFO_URL, so the login flow has to mint a genuine token from the real provider — pointing SSO at localhost would just break sign-in.

Usage

Export it before running the hub from this checkout, then drive the flows that hit the backend (codevhub install, codevhub config, codevhub model):

export CODEV_BACKEND_URL=http://127.0.0.1:8787

Note that an npm-installed codevhub will still read the baked URL, so this is for running out of the repo.

Pairs with the same override in CoDev Code (quickbeard/codev-code#329), so both clients can be aimed at one backend for a single test run.

bun run typecheck clean.

quickbeardand others added 2 commits August 25, 2026 18:02
…D_URL
Testing a codev-backend change end-to-end meant editing the baked BACKEND_URL
and remembering to put it back — and a localhost URL that slips into a commit
points every user's hub at their own machine, which is a silent, total
sign-in outage.
Unset, the baked URL is what ships, so this is inert in every real install.
SSO is deliberately not overridable: a locally-run backend still verifies
tokens against the real provider, so the login flow has to mint a real one.
Only the exchange moves.
@quickbeard
quickbeard merged commit 734a948 into mainAug 26, 2026
2 of 3 checks passed
@quickbeard
quickbeard deleted the feat/backend-url-override branch August 26, 2026 10:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@quickbeard