-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable API URLs #559
Conversation
Build succeeded and deployed at https://prism-559.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. My only question is about whether there is a way to avoid having to set 2 variables to do local dev. In particular, hitting prism-api.ovio.org as a default implies not knowing which version of code is running there, meaning possible bugs due to version mismatches. My gut says the default should be localhost, but maybe I'm missing something...
Fair point. The API changes a lot less often than the frontend and usually "adds" functionalities so this allows most devs that only touch on the frontend to not have to think about the backend at all. We can always change this in the future if it becomes cumbersome |
Make it easier to configure the analysis API using two environment variables:
Setting
REACT_APP_LOCAL
to true (or any value really), will make the frontend point tolocalhost
Otherwise, you can set
REACT_APP_API_URL
directly to replace the default URL ofprism-api.ovio.org
.For the alerts backend, you can now override the backend endpoint using the
API_URL
environment variable.