Minimum Hooks
#
Prep (start frourio in dev mode)Before we create the hooks.ts
and start writing the hooks, start frourio in dev mode.
It detects the creation of files, such as hooks.ts
, and puts a template in the case of an empty file.
#
Creation and automatic generationFor starters, let's create a hooks.ts
under /api
.
Then we get a directory level hooks
(*later), which is just a console.log
as follows.
- fastify
- express
server/api/hooks.ts
server/api/hooks.ts