We have tow environments, Testing
, and Production
We use Testing
in two different scenarios; on our local devices, and when we have our app deployed to TestFlight for our remote users to test.
We differentiate between our two domains manually within our config.js
file :
const domain = 'testing-server.herokuapp.com'; // 'actualWebsite.com';
So once everything is all set to go, we change the site to actualWebsite.com
and deploy. But! Is there anyway to make this ENV aware, so that it just knows it was on production and therefore would automagically point to actualWebsite.com
and if it was on TestFlight or on our local, it would automagically use testing-server.herokuapp.com
?