2.1.0 • Published 8 years ago

hapi-hobknob-client v2.1.0

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

hapi-hobknob-client

Hapi plugin for returning an initialised hobknob client.

Build Status Dependency Status devDependency Status npm version

Usage

$ npm i hapi-hobknob-client --save
var server = new (require('hapi').Server)();
server.connection({ port: 3000 });

server.register([
    {
        register: require('hapi-hobknob-client'),
        options = {
          applicationName: 'the-name-of-your-app-in-hobknob',
          Hobknob : {
            etcdPort: 4001,
            cacheIntervalMs: 30000,
            etcdHost: 'your-etcd-host-here'
          }
        }
    }
], function (err) {
    if (err) {
        console.error('Failed to load plugin:', err);
    }

    server.start();
});

//server can be found on the request object if you don't have server in the current function
const testToggleEnabled = server.plugins['hapi-hobknob-client'].getOrDefault('testToggle', true);

Configuration

All config values are unchanged as per hobknob client.

Release History

v2.0.0 - Richard Wright 04-01-2017

2.1.0

8 years ago

1.1.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.0.1

11 years ago