I am developing a Nativescript application which makes numerous server calls for various services. The test and production URLs for these calls are different and while switching back and forth between the Debug and Release version I might miss or mess something up (by accidentally using a production URL for debug app). I wanted to know if there are any best practices regarding this aspect of App publishing? I couldn't find any specific answer regarding my question on the internet and the closest thing I found were these article for ReactNative apps:
http://www.multunus.com/blog/2016/06/automated-environment-management-react-native-ios/
If someone can guide me on this specific to Nativescript application, I would really appreciate it. Thanks.