1.2.0 • Published 6 years ago

envv v1.2.0

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

envv

CircleCI codecov js-semistandard-style npm License MIT Bitcoin Donate

Simple util for config files that checks and returns an env var.

Installation

$ npm install envv

Usage

// config.js
const envv = require('envv');

module.exports = {
  listenAddr: envv('ADDR', '127.0.0.1'),  // (1)
  listenPort: envv('PORT')                // (2)
};
  1. listenAddr will be process.env.ADDR or 127.0.0.1
  2. if process.env.PORT is not given, Error: env var 'PORT' is missing will be thrown
1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

7 years ago

0.3.3

11 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.0

12 years ago