mcms node config loader.
npm install mcms-node-config-loadermcms-node-config-loader
======================
Easily load config files for multiple environments
/configDir
/devEnv
configFile.json
/anotherEnv
configFile.json
configFile.json
anotherConfigFile.json
`
Every file under the configDir is loaded as production environment. If you create a subdirectory named after an environment you
have defined before calling the module, it will overwrite the default config. For example, you have a mysql.json
config under the configDir with your mySQL connection settings. If you create the same file with different settings under
the configDir/development directory, when you're working on your dev machine theses settings will be loaded instead
Usage
check the examples folder for usage scenarios
Initialize like so :
`
var path = require("path");
var environments = {
'development' : ['ubuntu','mike-PC','mint-box'],
'production' : 'myProductionBox'
};
var configLoader = require("../index").setEnv(environments);
var Config = configLoader.loadConfig(path.join(__dirname,'./config'));
``