Skip to content

Instantly share code, notes, and snippets.

@dannycoates
Created March 3, 2015 00:05
Show Gist options
  • Save dannycoates/b0b72f5b0239f908fbf5 to your computer and use it in GitHub Desktop.
Save dannycoates/b0b72f5b0239f908fbf5 to your computer and use it in GitHub Desktop.
server.register(
{
register: require('hapi-able'),
options: {
git: 'git://github.com/dannycoates/able-demo.git',
addRoutes: true
}
},
function (err) {
if (err) {
log.critical('plugin', { err: err })
process.exit(8)
}
}
)
//...
{
path: '/v1/foo',
handler: function (req, reply) {
var buttonText = req.plugins.able.choose('buttonText')
req.render(buttonText)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment