title: Elegant environment handling in Nest.js
body: <p>I'm exploring using Nest.js for a critical application that currently has very little test-coverage. We need to make decisions based on environment flags, mostly loading additional express middleware, different loggin configuration etc. I'm using the approach to environment variables as <a href="https://docs.nestjs.com/techniques/configuration" rel="noreferrer">described in the documentation</a>, but am a bit unsure of how to elegantly (isolated, testable) handle further branching. I could handle all of this in my root module's <code>configure</code> hook, but feel like it'd get messy, even if I isolate it into individual methods, and there might be a better solution out there. Any help would be greatly appreciated! Thanks! ✌️</p>