Miss any of our Open RFC calls?Watch the recordings here! »

mocoolka-config

0.5.0 • Public • Published

mocoolka-setting

npm package license

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

link to Docs!

License

Licensed under the MIT, version 2.0. (see MIT).

Install

npm i mocoolka-config

DownloadsWeekly Downloads

1

Version

0.5.0

License

MIT

Last publish

Collaborators

  • avatar