Intercom for Hapi
A Hapi plugin for quickly accessing the Intercom for Node client.
Installation
npm install intercom-for-hapi --save
yarn add intercom-for-hapi --save
Getting Started
The purpose of this plugin is simply to allow you to instantiate the Intercom client once and then make it accessible to your entire Hapi application.
Example
var Hapi = ;var server = ;server; var options = token: '123sds88' // REQUIRED; // Register the pluginserver; // Declare a route that uses itserver; { var client = requestintercom; // also available via request.server.app.intercom clientusers;}; serverstart { console;};