Skip to content

codev0/dotenv-process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotenv-process

Dotenv-process adds ability to process each environment variable on top of dotenv.

Made from advices in this conversation.

Highly inspired by dotenv-expand,

Install

npm install dotenv --save
npm install dotenv-process --save

Usage

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.

Thanks for

  1. @kerimdzhanov for advices.
  2. @Rahirim for contributing.

About

Process env variables before initialization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published