So, recently I started working on a new startup and each time I do, I try to adopt a new technology be it language or framework . (this is not always recommended, in this case I have previous experience with NestJS) This time around I chose to adopt ...

Markdown supported · ⌘↵ to post
Benjamin Klotz
Glad to see someone else had the same requirements in regards to managing environments and environment variables in NestJS. What we ended up using was nest-typed-config with its multiple loaders approach.
Basically we have 4 different config files:
We still leverage the env var loader with highest precedence to adhere to 12factor principles, while providing sane defaults to ease the setup and being developer friendly.