0.1.1 • Published 8 years ago

cityhall v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

This is the npm library for City Hall Enterprise Settings Server

ABOUT

This project can be installed using:

npm install cityhall

USAGE

The intention is to use the built-in City Hall web site for actual settings management, and then use this library for consuming those settings, in an application. As such, there is really only one command to be familiar with:

startUp = function (err, data) {
   console.log(data.value);
};

var settings = require('cityhall')('http://path.to.server/api');
settings.getVal('/test/val1', startUp);

You can also get multiple values, and in multiple ways, at once using:

settings.getVal(
    {
        value1: {path: '/test/val1'},
        value2: {path: '/test/val2', environment: 'dev'},
        value3: {path: '/test/val3', override: 'cityhall'}
    },
    startUp);