0.0.1 • Published 8 years ago

green-env v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Green-env

Green-env is a way to define environnement variables, it is highly inspired by "dotenv" (wich is amazing, but BSD licence). It aim to be an MIT alternative. Currently WIP. Edit Add topics

1. Install

With NPM node package manager

npm install green-env -S

or with Yarn yarn package manager

yarn add green-env

2. A file environnment

Create a .green file at root directory giving it some variables like so :

CUSTOM_HOST=localhost
CUSTOM_USER=root
CUSTOM_PASS=password

3. The use

Place at the very beginning of your application this method :

require('green-env').greenify()

Now you have access to those datas with process.env :

console.log(process.env.CUSTOM_HOST) // Prints localhost
console.log(process.env.CUSTOM_USER) // Prints root
console.log(process.env.CUSTOM_PASS) // Prints password

LICENCE

MIT License, see LICENCE file at root for more informations.

0.0.1

8 years ago