xpr-hapi
Install
npm install xpr-hapi
Options
Can be configured with options following this schema:
timeout: 10000 featureUrl: 'https://example.com/' devKey: 'xxxxxxx' cookieName: 'xpr.config' experiments: name: 'featureFlagTest' default: true description: 'This is a test feature flag.' cronTime: '* * * * *' { // ... } announce: true reference: 'local'
Options specific to this plugin:
crontTime
: Used to callfeatureClient.cron(...);
. Defaults offannounce
: Used to determine if experiments are announced viafeatureClient.announce()
. Defaults offcallback
: The callback passedcron()
andannounce()
Example
Below is an example plugin loading script:
'use strict'; const xprHapi = ; moduleexports = register: xprHapi options: featureUrl: 'https://example.com/' devKey: '1z-2a-3y-4b-5x-6c' experiments: name: 'featureFlagTest' default: true description: 'This is a test feature flag.' cronTime: '* * * * *' announce: false reference: 'int' ;