2016-03-03 13:35:15 -08:00
# Example app using react-native-config
2017-12-04 21:34:37 -08:00
Just a simple app accessing config variables from `.env` and `.env.production` .
2016-03-03 13:35:15 -08:00
2017-12-04 21:34:37 -08:00
## Running
2016-03-03 13:35:15 -08:00
By default it will read variables from `.env` :
```bash
$ react-native run-android
```
To read from another file just specify it with `ENVFILE` , like:
```bash
$ ENVFILE=.env.prod react-native run-android
```
2016-03-03 16:36:50 -08:00
2017-12-04 21:34:37 -08:00
## Running from Xcode
2016-03-03 16:36:50 -08:00
Open the Xcode project file in `Example/ios/Example.xcodeproj` .
2017-12-04 21:34:37 -08:00
Notice there are two schemes setup for the application: "Example" runs the default build, reading vars from `.env` – and "Example (production)" is configured to read from `.env.production` .