0.2.1 • Published 8 years ago

confee v0.2.1

Weekly downloads
19
License
MIT
Repository
github
Last release
8 years ago

node-config

About

This is a simple module to easily manage configurations for NodeJS applications. You can extend configurations, so it's easy to override other configurations from a base file for example

Usage:

const config = require('node-config');

config.init({
  srcFolder:'./config', // path to config files
  type: 'js'  // or 'json'
});

// load config.
const configObj = config.load('myconfig');

// access data from the config object
configObj.get('site.email');
configObj.get('email.smtp.username');

Config files can extend other config files:

base.js:

module.exports = {
  version: '1.2.4',
  name: 'foo'
};

development.js:

module.exports = {
  extends: 'base',
  name: 'bar'
};