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
const config = require('confee');
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'
};