Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Loading environmental variables for your development enviroment
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.travis.yml
README.md
package.json

README.md

dev-vars

NPM version Build Status

Idea

The idea for this module is to load enviromental variables for development.

Usage

You can refer to the examples folder for an example on typical usage below is an example

  // Inside your project file
  // This will load a file called .env.json 
  require('dev-vars')().load();

  // This will load a file called /variables/.env.json
  require('dev-vars')().load({ path: '/variables' });

  // If for some reason you need to reset your enviromental variables you can use this
  var dev_vars = require('dev-vars')();
  dev_vars.reset();

Why?

I created this because I wanted something that could do one task Load enviromental variables from a file and I did not see a 'simple' alternative.

Something went wrong with that request. Please try again.