Different environmental variables for local, staging & production


I currently detect for Cordova to determine whether to use my localhost server or my production server API endpoint. However, I would like to incorporate a staging server so as not to manipulate our live data set. (Our staging server is a replica of production but on a different database.) For example, I’d like QA testing to be done on the staging.app.com URL, and when building to submit to the app stores it uses app.com URL.

What’s the best way to go about this? Thanks!


Probably https://github.com/driftyco/ionic-cli/issues/1205 can help you.