Explanation of basic mechanisms and specifications in Frourio.
In frourio, controllers are defined using file-system based API routing, similar to Next.js.
A handler is a function that takes a request as an argument and returns a response as a return value.
📄️ Lifecycle and Hooks
Lifecycle in Frourio
Using AdditionalRequest, you can extend the FastifyRequest or Request types.
📄️ Response Schema
Fastify serializes responses using fast-json-stringfy instead of JSON.stringfy() when a json schema is defined.
📄️ Command Line Interface