react-native-config/Example
Anders Back a1056e175e Support For Multi Target Applications (#66)
* CONFIGURATION_BUILD_DIR => BUILD_DIR

* support for react native 0.40
2017-04-26 15:00:07 -07:00
..
android bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
ios Support For Multi Target Applications (#66) 2017-04-26 15:00:07 -07:00
.buckconfig bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
.env normalize example files 2016-03-03 13:32:22 -08:00
.env.prod normalize example files 2016-03-03 13:32:22 -08:00
.flowconfig bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
.gitignore bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
.watchmanconfig blank new react-native app 2016-02-22 12:54:52 -08:00
README.md update readme to show how to pick env files in ios 2016-03-03 16:36:50 -08:00
index.android.js bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
index.ios.js bump example to react-native 0.33 2016-09-13 18:39:29 -07:00
package.json bump example app to 0.38 2016-11-28 15:08:05 -08:00

README.md

Example app using react-native-config

Just a single app accessing config variables from .env and .env.prod.

Running in Android

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 in iOS

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 (prod)" is configured to read from .env.prod.