June 2023
Intermediate to advanced
406 pages
9h 22m
English
A Fastify plugin is an essential tool at the disposal of a developer. Every functionality except the root instance of the server should be wrapped in a plugin. Plugins are the key to reusability, code sharing, and achieving proper encapsulation between Fastify instances.
Fastify’s root instance will load all registered plugins asynchronously following the registration order during the boot sequence. Furthermore, a plugin can depend on others, and Fastify checks these dependencies and exits the boot sequence with an error if it finds missing ones.
This chapter starts with the declaration of a simple plugin and then, step by step, adds more layers to it. We will learn why the options parameter is crucial ...
Read now
Unlock full access