hapi-hobknob-client

2.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i hapi-hobknob-client

Weekly Downloads

5

Version

2.1.0

License

MIT

Last publish

Collaborators

  • acolchado
  • arnoldzokas
  • matteofigus
  • christriddle
  • ryantomlinson
  • andyroyle
  • stevejhiggs