Skip to content

Commit

Permalink
📚 dotenv usage & create-react-app 0.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mars authored Oct 16, 2016
1 parent dc5dd78 commit b56139c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Set [env vars on a Heroku app](https://devcenter.heroku.com/articles/config-vars
heroku config:set REACT_APP_HELLO='I love sushi!'
```

For local development, use [dotenv](https://www.npmjs.com/package/dotenv) to load variables from a `.env` file. *Requires at least create-react-app 0.7.*

#### Compile-time vs Runtime

Two versions of variables are supported. In addition to compile-time variables applied during [build](https://github.com/facebookincubator/create-react-app#npm-run-build), this buildpack supports runtime configuration as well.
Expand Down Expand Up @@ -146,6 +148,8 @@ git push heroku master

#### Runtime configuration

*Requires at least create-react-app 0.7.*

Install the [runtime env npm package](https://www.npmjs.com/package/@mars/heroku-js-runtime-env):

```bash
Expand Down

0 comments on commit b56139c

Please sign in to comment.