mocoolka-setting
[![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
Last updated 3 years ago by mocoolka .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mocoolka-setting 
SYNC missed versions from official npm registry.

mocoolka-setting

npm package license Build Status codecov

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

link to Docs!

License

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

Current Tags

  • 0.5.5                                ...           latest (3 years ago)

5 Versions

  • 0.5.5                                ...           3 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |