Created
March 3, 2015 00:05
-
-
Save dannycoates/b0b72f5b0239f908fbf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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