Dotenv-process adds ability to process each environment variable on top of dotenv.
Made from advices in this conversation.
Highly inspired by dotenv-expand,
npm install dotenv --save
npm install dotenv-process --save
As early as possible in your application, require dotenv and dotenv-process, and wrap dotenv-process around dotenv.
const dotenv = require('dotenv')
const dotenvExpand = require('dotenv-process')
const myEnv = dotenv.config()
dotenvExpand(myEnv)
See test/.env for examples of variable expansion in your .env
file.
- @kerimdzhanov for advices.
- @Rahirim for contributing.