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

[EPPETA-19] Inject the base URL into the react application #37

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jleiva-gap
Copy link
Contributor

Add env file to set the API base path

Add env file to set the API base path
@jleiva-gap jleiva-gap marked this pull request as ready for review January 2, 2024 23:26
@jleiva-gap jleiva-gap marked this pull request as draft January 2, 2024 23:50
// TODO: replace hard-coded with some sort of runtime setting
// Will be fixed in EPPETA-19.
const BaseUrl = "https://localhost:7065";
const BaseUrl = process.env.REACT_APP_EPPETA_API_BASE_PATH;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jleiva-gap does this really work? I thought FetchHelpers was a client-side component, not a server-side component. But I may have misunderstood.

If it is serverside, then does this mean that one must run the application using the npm start function? That's probably acceptable inside a Docker container, but might be hard to do in a real installation, since it requires NodeJs.

Ideally in a real installation, the end-user would have a choice of webservers to run, without needing NodeJs. For example, just copy the html, compiled js files, css, and images into IIS or Apache.

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.

2 participants