0.0.2 • Published 10 years ago

dotenv-node v0.0.2

Weekly downloads
10
License
BSD
Repository
github
Last release
10 years ago

DotEnv for Node.js

Build Status

DotEnv loads environment variables from .env into your ENV.

Installation

As early as possible in your application require dotenv and load the .env variables.

DotEnv = require('dotenv-node');
new DotEnv();

Usage

Add your application configuration to a .env file in the root of your project:

S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE

When your application loads, these variables will be available via process.env:

process.env.S3_BUCKET;
process.env.SECRET_KEY;

Inspiration

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Running tests

npm install
npm test