mocoolka-setting
v0.5.5
Published
[![npm package](https://img.shields.io/npm/v/mocoolka-setting.svg)](https://www.npmjs.com/package/mocoolka-setting) [![license](https://img.shields.io/npm/l/mocoolka-setting.svg)](LICENSE.md) [![Build Status](https://secure.travis-ci.org/mocoolka/mocoolk
Downloads
4
Maintainers
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',
'applyModuleSettingPromise', { 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).