Skip to content

Instantly share code, notes, and snippets.

@nlf
Created March 20, 2014 22:42
Show Gist options
  • Save nlf/9675595 to your computer and use it in GitHub Desktop.
Save nlf/9675595 to your computer and use it in GitHub Desktop.
var handler = function (request, reply) {
// this = { isRoot: true }
};
server.route({
method: 'GET',
path: '/',
handler: handler,
config: {
bind: {
isRoot: true
}
}
})
// OR
var handler = function (request, reply) {
// request.param.something = 'whatever'
}
server.route({
method: 'GET',
path: '/{something}',
handler: handler
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment