-
Notifications
You must be signed in to change notification settings - Fork 3
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
Remove config.js in favor of .env #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
=======================================
Coverage 95.41% 95.41%
=======================================
Files 10 10
Lines 131 131
Branches 18 18
=======================================
Hits 125 125
Misses 5 5
Partials 1 1 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
=======================================
Coverage 95.41% 95.41%
=======================================
Files 10 10
Lines 131 131
Branches 18 18
=======================================
Hits 125 125
Misses 5 5
Partials 1 1 Continue to review full report at Codecov.
|
.env
Outdated
@@ -1 +1,4 @@ | |||
PORT=3001 | |||
|
|||
REACT_APP_BACKEND_HOST="http://localhost:3000" | |||
REACT_APP_BACKEND_VERSION="> 0.0.0-90" |
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.
I don't think that the backend version requirement should be part of the .env
file. It is a requirement that the code makes, not one that the server makes. Maybe we should keep a config.js
for things like this and have an additional .env
file for things like the backend host address.
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.
I think a good solution would be to specify the backend version in the package.json
file (custom fields are allowed), but importing the file (and all other files outside of src
) is currently not allowed. There is a PR for that however that seems to be near completion.
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.
As a work-around for now, I can symlink package.json
to src/config.json
. Any downsides to symlinks in git?
Since you are fixing the frontend-backend communication here, can you please add a request header |
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.
Makes it easier to inject build time options like the backend host by setting the
REACT_APP_BACKEND_HOST
environment variable. See ontohub/deployment#9.