.env
must be in root of the project- all variable in .env should be prefixed with REACT_APP_ in order to be accessible
- CRA already include dotenv so no need to import it before using
process.env.
- Don't use sensitive info (i.e. Secret Keys) in .env for CRA. It will get exposed.
- Use backend server to store secret keys and making calls as an added security measure.
Last active
February 1, 2020 18:48
-
-
Save zenkbaries/a3ec25242deb273edb38d4f6a99b859b to your computer and use it in GitHub Desktop.
.env with `create-react-app`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment