mocoolka-config
v0.5.0
Published
[![npm package](https://img.shields.io/npm/v/mocoolka-tools.svg)](https://www.npmjs.com/package/mocoolka-setting) [![license](https://img.shields.io/npm/l/mocoolka-setting.svg)](LICENSE.md)
Downloads
4
Readme
mocoolka-setting
Mocoolka-setting is base module for mocoolka application.It will reading application setting to every sub module.
Install
$ npm install mocoolka-setting
Usage
edit app.mk-setting.json on root
{
"testModule":{
"item1":"app-item1",
"item2":"app-item2",
"itemArray":{"array1":{
"item1":"app-item1",
"item2":"app-item2"
},
"array2": {
"item1": "app-item1",
"item2": "app-item2"
}
}
}
}
start micro service
const settingService = require('mocoolka-setting');
settingService(__dirname);
merge module default setting and app module setting.
serviceTools.standClientPromise('mocoolka-setting',
'applyModuleSetting', { moduleName: 'test', moduleDefaultSetting: testSetting }).then(data=> {
console.log(data);
}).catch(error=> {
console.error(error);
});
Docs
License
Licensed under the MIT, version 2.0. (see MIT).