> For the complete documentation index, see [llms.txt](https://sebloix.gitbook.io/gstore-node/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sebloix.gitbook.io/gstore-node/v8.x/middleware-hooks/about.md).

# About

Middleware or 'Hooks' are functions that are executed right before or right after a specific action on an entity.\
Hooks are available for the following methods

* Entity.save() (also executed on Model.**update()**)
* Model.delete()
* Model.findOne()
* On your custom methods

Your hooks **must return a Promise** and you must use the "Promised" version of the methods, **not** the callback.
