a1056e175e
* CONFIGURATION_BUILD_DIR => BUILD_DIR * support for react native 0.40 |
||
---|---|---|
.. | ||
android | ||
ios | ||
.buckconfig | ||
.env | ||
.env.prod | ||
.flowconfig | ||
.gitignore | ||
.watchmanconfig | ||
README.md | ||
index.android.js | ||
index.ios.js | ||
package.json |
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
.