react-native-config/Example
Pedro Belo 0993258ab6 do this android setup too 2017-12-04 22:12:07 -08:00
..
__tests__ bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
android do this android setup too 2017-12-04 22:12:07 -08:00
ios bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.babelrc bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.buckconfig bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
.env bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.env.production bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.flowconfig bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.gitattributes bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.gitignore bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
.watchmanconfig blank new react-native app 2016-02-22 12:54:52 -08:00
App.js bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
README.md bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
app.json bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
index.js bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
package.json bump example app to 0.50.4 2017-12-04 21:34:37 -08:00
yarn.lock bump example app to 0.50.4 2017-12-04 21:34:37 -08:00

README.md

Example app using react-native-config

Just a simple app accessing config variables from .env and .env.production.

Running

By default it will read variables from .env:

$ react-native run-android

To read from another file just specify it with ENVFILE, like:

$ ENVFILE=.env.prod react-native run-android

Running from Xcode

Open the Xcode project file in Example/ios/Example.xcodeproj.

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.