1.0.8 • Published 6 years ago

nodejs-config-loader v1.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

nodejs-config-loader

Load config settings from remote url when you want share settings between multiple projects as needed,this module can be used in your front-end project(vue.js,react.js,etc.) and back-end project(node.js)

Module Usage

Install

npm install nodejs-config-loader

Usage

Module Require:

var configLoader = require("nodejs-config-loader");

Options, only need set once, usually set below at front-end or back-end startup phase

configLoader.setOptions({
    remoteBaseUrl: "...",//your http request baseUrl,it'srequired
    API:"" //the RESTApi to get config json data, make sure your own api return json object, optional
});

Method Use:

configLoader.getConfigValue('configkey'); //this will return the specific config value by property name
1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago