25 lines
616 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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`:
```bash
$ react-native run-android
```
To read from another file just specify it with `ENVFILE`, like:
```bash
$ 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`.