Use Angular Style Environment Config in NestJS or Any NodeJs App

A Simple, Strongly typed, and Lazy-loaded Solution

Sunny Sun
JavaScript in Plain English
3 min readAug 16, 2020

--

Managing different environment configurations for a Web App is an essential task. NestJS provides an out-of-box config package based on .env files. However, my preference is to use the Angular-style environment config files.

--

--

I am full stack developer. Love coding, always leaning, writing and sharing. Visit my personal blog https://sunnyy02.github.io