Comments (3)
To read in a specific file via an argument you would use the --path
flag e.g. to read in .env.staging
react-env --path .env.staging
You are using the --env
flag which looks for an existing environment variable by that name and then finds the env file from that name. e.g. APP_ENV=production
along with --env APP_ENV
would load .env.production
from react-env.
fair call...! thank you. Would you mind writing up a small PR on the docs?
from react-env.
@andrewmclagan ,
it would be better if you make it clear that we should set APP_ENV
as an environment variable in terminal.
because for now with the example you've written, we might be confused as "you have to replace 'APP_ENV' with the name of environment you want". (As a result, we might end up writing react-env --env staging
instead of APP_ENV=staging react-env --env APP_ENV
.)
from react-env.
Related Issues (20)
- how to pass env variables from docker compose HOT 2
- Possible improvement on Docker support HOT 1
- NextJs build step
- NextJS + Dockerfile HOT 1
- Incorrect type definitions for env function
- Default ENV behaviour misaligned with NextJS
- Using react-env on builded project
- Question HOT 3
- Can this be used to pass env vars to docker container for NGINX? HOT 2
- window.__ENV undefined HOT 1
- Cache Busting HOT 3
- Broken Docker image on Docker Hub HOT 2
- Feedback/Docker Usage HOT 3
- window.__ENV not available HOT 1
- Please add documentation to the readme about importing __ENV file in the index.html HOT 1
- Improvement ideas and caveats HOT 1
- Usage with Jest and Storybook HOT 2
- feature request - load vars from single json file like env-cmd HOT 1
- Docker Error: EACCES: permission denied, open '/app/public/__ENV.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-env.