Skip to content

Instantly share code, notes, and snippets.

@gvilarino
Created September 10, 2015 20:22
Show Gist options
  • Save gvilarino/1631c51e5ff9e1380d85 to your computer and use it in GitHub Desktop.
Save gvilarino/1631c51e5ff9e1380d85 to your computer and use it in GitHub Desktop.
server.route({
method : 'GET',
path : '/components/links/{id}',
handler : defaultHandlers.getById(Link),
config : {
validate: {
params: {
id: validateId
}
}
}
})
vs
app.get(‘components/links/:id’, validate, (req, res) => {
// code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment