Skip to content

Pre handler hook with prefix route #5025

Closed Answered by Eomm
rndy28 asked this question in Q&A
Discussion options

You must be logged in to vote

Write instance.addHook instead.
Your code applies the hook to the app instance

There is another technique using the onroute hook. I call it aspect oriented programming in my fastify book 👍

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rndy28
Comment options

Answer selected by rndy28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants