setting hooks or writing hook functions for the Feathers framework
What it is?
Hooks are functions that are transport independent and that can be set to be called before, after, or on error of a service method, for extending the behavior of the service, for example, validating, logging, sending notifications etc.
How if works?
Several hook functions can be registered for the same event. Upon occurence, the hook functions are chained and called in the order of their registration.
See also
- Hooks in the Feathers documentation
- API service composition with hooks (Article on the Feathers blog)