0.1.2 • Published 10 years ago

confectioner v0.1.2

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

confectioner Version Badge

build status dependency status dev dependency status license

npm badge

Simpliest configuration builder which used the environment.

Installation

npm install confectioner --save

Example

// example.js

var confectioner = require('confectioner');

var config = confectioner({
    env: { envname: 'NODE_ENV', defaultValue: 'development' },
    hostname: { envname: 'MY_HOST', defaultValue: 'localhost' },
    port: { envname: 'MY_PORT', defaultValue: 1337, type: 'int' },
    baseuri: { envname: 'MY_BASEURI', defaultValue: '/myapp' }
});

console.log(config.getValuesMap());

// $ NODE_ENV=production MY_PORT=80 node --harmony example.js
// { env: 'production',
//   hostname: 'localhost',
//   port: '80',
//   baseuri: '/myapp' }

## API

API documentation

Tests

npm test

Release History

  • 0.1.0 Initial release

Credits

License

MIT