https://github.com/tomdoestech/just-enough-fastify-to-be-productive
https://github.com/tomdoestech/just-enough-fastify-to-be-productive
fastify
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tomdoestech/just-enough-fastify-to-be-productive
- Owner: TomDoesTech
- Created: 2023-02-13T07:46:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T07:46:58.000Z (over 3 years ago)
- Last Synced: 2025-04-08T08:48:39.420Z (about 1 year ago)
- Topics: fastify
- Language: TypeScript
- Homepage: https://youtu.be/ZHLB4StAqPM
- Size: 21.5 KB
- Stars: 14
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fastify
## What is Fastify?
* Web framework for Node.js
* Build to be performant & secure
* Inspired by Express & Hapi
## Why use Fastify?
* Full async/await support
* Helpful and flexibly TypeScript support
* Rich and high-quality [ecosystem](https://www.fastify.io/ecosystem/)
* Secure
* It's fast
Note: Will be using TypeScript, ESM & async/await
Fastify does support JS, CJS and callbacks
## What are we covering?
### The basics
* Build an instance of Fastify
* Start the server
* Register a route
* Request & reply
* Graceful shutdown
### Plugins & register
https://www.fastify.io/docs/latest/Reference/Plugins/
* Register routes as plugins
* Register external plugins
* Register with options
* Call order
### Decorators
https://www.fastify.io/docs/latest/Reference/Decorators/
* Modify the request object - addHook
* Add functionality to the Fastify instance - decorate
## Request hooks
https://www.fastify.io/docs/latest/Reference/Hooks
* Lifecycle hooks
## Validation
* Validate requests
* Validate responses
## Bonus