title: How to manage different config environments in nestjs
body: <p>I'd like to have a few environments, let's say <code>development</code>, <code>production</code>, <code>test</code>. These environments should be independent and use their own set of config parameters, e.g. for DB, SERVER_PORT, USER etc.
  They should not be in the code base, so I think they should be different .env files. That's to say, I should be able to load different .env files depending on what environment is active. Also, it's not clear where I have to set that env switcher.</p>
  
  <p>Maybe it should be a single .env file that has the NODE_ENV parameter, that param can be set to any of the above-mentioned values, be that development, production or test. And depending on the value of this parameter a necessary set of config parameters gets automatically loaded.</p>
  
  <p>I've read the documentation, it seems a little confusing to me at the moment.    </p>
  
  <p>Seems like there should be some config factory.</p>