There are two primary environments that we work with: Testing
and Production
.
We utilize the Testing
environment in two different scenarios. First, on our local devices during development, and also when we deploy our app to TestFlight for remote user testing.
To distinguish between the two domains, we manually edit our config.js
file:
const domain = 'testing-server.herokuapp.com'; // 'actualWebsite.com';
Once all set up and ready, we switch the site to actualWebsite.com
and proceed with deployment. However, is there a way to make this process environment-aware? This would mean automatically directing to actualWebsite.com
if it's in production, or using testing-server.herokuapp.com
if it's in Testing or on local devices.