dotenv is a zero-dependency npm module that loads environment variables from a .env
file into process.env
.
dotenv-flow extends dotenv adding the ability to have multiple .env*
files like .env.development
, .env.test
and .env.production
, also allowing defined variables to be overwritten individually in the appropriate .env*.local
file.
Storing configuration in environment variables separate from code and grouping them by environments like development, test and production is based on The Twelve-Factor App methodology.