So you've been working on your Mongoose based app for a bit, and now you need to deploy it to a server somewhere – a testing environment, or even the production environment. Great! … But what do you do about the configuration string for your Mongoose code? Your local environment is not the same as the production one, or any other environment for that matter!
To solve this problem, I built an environment configuration module that I called EPA – yes, named after *that* “EPA”, but far less … bureaucratic. With this module, you can easily define different configuration settings for different runtime environments. And you aren't limited to just 2 or 3… you can configure as many environment as you need!
In this episode, then, I'll show you how to update your application code to use EPA and have a different connection string, as well as other configuration settings, based on the runtime environment of the application.