Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Bubbly UI is hardcoded to use http://localhost:8111 #147

Open
jlarfors opened this issue Sep 6, 2021 · 1 comment
Open

Bubbly UI is hardcoded to use http://localhost:8111 #147

jlarfors opened this issue Sep 6, 2021 · 1 comment

Comments

@jlarfors
Copy link
Contributor

jlarfors commented Sep 6, 2021

Idea would be to use something like the window.env and write the BUBBLY_API to there.

Then access this using some js, e.g.:

const bubblyAPI = () => { return window["env"] ? window["env"]["bubblyAPI"] : "" }

export { bubblyAPI }

Right now the static files are hosted with Go using go:embed and one open question is how to add to the window.env using embedded files.

@jlarfors
Copy link
Contributor Author

One discussion today was the possibility of just using /api/v1 as the basepath. Because the UI is hosted on the same port as the API it should be able to resolve, as the browser will use the same base URL.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant