futurice / pepperoni-app-kit

Pepperoni - React Native App Starter Kit for Android and iOS
http://getpepperoni.com
MIT License
4.63k stars 645 forks source link

Setting API_ROOT #199

Open matejstrasek opened 7 years ago

matejstrasek commented 7 years ago

Using get from api.js already implemented in the repository and having issues where to set API_ROOT.

Error: Undefined configuration key: API_ROOT at getConfiguration

How should I properly do that?

fabriziomoscon commented 7 years ago

My app uses a slightly different version of what is now in master. I use react-native-config for configurations, but I think you have to call this function as soon as the react-native part of the app loads: https://github.com/futurice/pepperoni-app-kit/blob/master/src/utils/configuration.js#L5