Skip to content
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

Merged
merged 19 commits into from
Nov 16, 2023
Merged

Configurable API URLs #559

merged 19 commits into from
Nov 16, 2023

Conversation

ericboucher
Copy link
Collaborator

@ericboucher ericboucher commented Sep 12, 2022

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 to localhost
Otherwise, you can set REACT_APP_API_URL directly to replace the default URL of prism-api.ovio.org.

For the alerts backend, you can now override the backend endpoint using the API_URL environment variable.

@github-actions
Copy link

github-actions bot commented Sep 12, 2022

Build succeeded and deployed at https://prism-559.surge.sh
(hash f4cffc5 deployed at 2023-11-16T16:26:37)

@ericboucher ericboucher changed the title Configurable URL for the analysis API Configurable API URLs Sep 15, 2022
alerting/Dockerfile Outdated Show resolved Hide resolved
frontend/src/utils/constants.ts Show resolved Hide resolved
@sifelix sifelix removed their request for review October 2, 2023 08:19
Copy link
Collaborator

@laurentS laurentS left a 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...

@ericboucher
Copy link
Collaborator Author

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

@ericboucher ericboucher merged commit ba31877 into master Nov 16, 2023
6 checks passed
@ericboucher ericboucher deleted the api-url-param branch November 16, 2023 16:35
Sign up for free to 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.

3 participants