So here is the situation. I have made an app that needs a server to work properly. For making new releases I spin up an test server with the same code, but with a different ip address. Currently I change the ip address in the app itself test the app and for the release I change it back to the production ip address (who is running the new version then). Of course this works, but it does not feel right to change the ip address everytime. I could do something like this How to execute a specific function only in DEBUG and AdHoc modes (making some code run during development and don't let it run during production), but is that a good method to go around this problem?
In short I would really like to hear how you would do it or how you are running it right now. So how can I use the test servers during the development and the production servers during production?
Note: I am using Amazon AWS to make this all work. I do not know if that makes different/easier around this.