Fastify (7 h)
To learn
- kafka redis with fastify
- Fastify Technical Principles - YouTube
- azure function nodejs - YouTube
- Moving Fastify to Azure Pipelines - BDL2059 - YouTube
- read here to understand how to handle the scope of a plugin
- the hitchhiker's guide to plugins
- JSON Schema
- Read Validation and Serialization to learn more
- Read Content-Type Parser to learn more about Fastify's default parsing functionality and how to support other content types
- Read the testing documentation to learn more!
Ideas
- Rebuild blurcasts' backend with fastify
The hitchhiker's guide to plugins (+0.5 h) (Draft)
The hitchhiker's guide to plugins
- "Every time you use the
register
API, a new context is created ..."
Encapsulation and breaking it (+2 h)
Should you contribute to Open Source? - YouTube
- "Open source is the way I could find the mentor."
Building a modular monolith with Fastify - Matteo Collina, Node Congress 2023 - YouTube
1, 2, 3... Fastify! - Matteo Collina - YouTube
- Plugin
autoload
- Test with
tape
Getting started (+3.5 h)
Fastify is a web framework. Other than React, Vue, and Svelte those frontend web framework, there are backend web framework, such as Express and Fastify.
Details
Your first plugin:
- With Fastify everything is a plugin.
- This is one of the best features of Fastify, it will load your plugins in the same order you declare them, and it will load the next plugin only once the current one has been loaded. In this way, we can register the database connector in the first plugin and use it in the second
- Plugin loading starts when you call
fastify.listen()
,fastify.inject()
orfastify.ready()
- The MongoDB plugin uses the
decorate
API to add custom objects to the Fastify instance, making them available for use everywhere.
Loading order of your plugins:
└── plugins (from the Fastify ecosystem)
└── your plugins (your custom plugins)
└── decorators
└── hooks
└── your services
│
└── service A
│ └── plugins (from the Fastify ecosystem)
│ └── your plugins (your custom plugins)
│ └── decorators
│ └── hooks
│ └── your services
│
└── service B
└── plugins (from the Fastify ecosystem)
└── your plugins (your custom plugins)
└── decorators
└── hooks
└── your services
Take your http server to ludicrous speed - YouTube
A "fast" Introduction to Fastify - Matteo Collina, NearForm - YouTube
A Fastify Tale of Shapes - Matteo Collina, NearForm - YouTube