Introducing: Flexible runtime environment config #22755
Unanswered
andrewmclagan
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/andrewmclagan/react-env
Frameworks such as Next allow for some nice defaults such as
.env.local, .env.production, .env
. This has the limitation where you may want to run your app in different environments such as "staging, integration, qa" but still build a "production" app withNODE_ENV=production
. With react-env this is possible:for staging you would simply set
APP_ENV=staging
where you run your app:Thus
REACT_APP_API_HOST=api.staging.com
in your staging environment.Beta Was this translation helpful? Give feedback.
All reactions