Skip to content
Herding invisible cats
Find file
Latest commit 2b56157 @dshaw Ooh, node-tap has deepEqual.
Failed to load latest commit information.
examples/simple Simple example.
lib Allow Env to be used without a env.json file.
test Ooh, node-tap has deepEqual.
.gitignore oops
.travis.yml oops Context.
index.js oops
package.json Allow Env to be used without a env.json file.

Env - In your environment managing your variables.

Build Status

Managing environment variables can be a pain. Env helps make that better.

Module status

Env is an evolving project based which came out of discussions with @joemccann and @clintandrewhall. I don't consider this package fully baked yet.

Get Env.

npm install env


Add an env.json file to your repo.

  "DB_HOST": 1,
  "DB_PORT": 1,
  "DB_USER": 1,
  "DB_PASS": 1
var env = require('env')()

env.ok(function(err) {
  if (!err) return

// Yes, it's SYNC, so you can do this too!

function handleEnv (err) {
  if (!err) return

if (env.ok(handleEnv)) {
  var port = env.get('SETUP_PORT')

Env is sync like require, so it's tasks can be accomplished before app execution.

Follow dshaw

Something went wrong with that request. Please try again.