Nice write up! I believe creating an .env file and adding keys like REACT_APP_API_KEY=XXX should do the trick.
May I know why would we need to install env-cmd package that you are referring to?
we need cmd-env to tell the script which env file it should read from
For example:
our start should read from stage file as mentioned in the article but if we need to develop with the variables of the production locally you will make your start script read from the production env file
which is can't be done without cmd-env or similar package
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice write up! I believe creating an
.env
file and adding keys likeREACT_APP_API_KEY=XXX
should do the trick.May I know why would we need to install
env-cmd
package that you are referring to?Hello pavan,
we need cmd-env to tell the script which env file it should read from
For example:
our start should read from stage file as mentioned in the article but if we need to develop with the variables of the production locally you will make your start script read from the production env file
which is can't be done without cmd-env or similar package