confee

0.2.1 • Public • Published

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'
};

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.11latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.11
0.2.01
0.1.01

Package Sidebar

Install

npm i confee

Weekly Downloads

3

Version

0.2.1

License

MIT

Last publish

Collaborators

  • rrichter