Fastify

Fastify 5 · intermediate

Fastify track

Build production Node APIs with Fastify. Schema-based routing, JSON Schema validation, encapsulated plugins, hooks, decorators, swagger, websockets, and a serialization story that's among the fastest in the JS ecosystem.

Start the first lesson 70 of 70 lessons live

Section 02

Schemas & Validation

JSON Schema for body/params/query/response, TypeBox, Ajv, OpenAPI.

10 / 10 lessons
Chapter quiz 8 questions on Schemas & Validation
  1. 01 Schemas — Validate & Serialize 4 min
  2. 02 Body Schemas 4 min
  3. 03 Params Schemas 4 min
  4. 04 Querystring Schemas 4 min
  5. 05 Response Schemas 4 min
  6. 06 TypeBox — Schemas as TypeScript 4 min
  7. 07 Tuning Ajv 4 min
  8. 08 Error Responses 4 min
  9. 09 Content-Types & Parsers 4 min
  10. 10 Swagger / OpenAPI From Schemas 4 min

Section 03

Plugins, Hooks & Lifecycle

Encapsulated plugins, decorators, hooks, prefixes, route modules.

10 / 10 lessons
Chapter quiz 8 questions on Plugins, Hooks & Lifecycle
  1. 01 Plugins — Fastify's Composition Unit 4 min
  2. 02 The fastify-plugin Wrapper 4 min
  3. 03 Encapsulation — The Big Idea 5 min
  4. 04 Request Hooks 5 min
  5. 05 Application Hooks 4 min
  6. 06 Decorators — Extend app / request / reply 4 min
  7. 07 Route Prefixes 4 min
  8. 08 Organizing Routes Into Modules 4 min
  9. 09 onSend Hook — Mutate the Outgoing Payload 4 min
  10. 10 onError Hook 4 min

Section 06

Realtime, Streams & GraphQL

Streaming, SSE, WebSockets, GraphQL with Mercurius, queues, telemetry.

10 / 10 lessons
Chapter quiz 8 questions on Realtime, Streams & GraphQL
  1. 01 Streaming Responses 4 min
  2. 02 Server-Sent Events 4 min
  3. 03 @fastify/websocket 4 min
  4. 04 GraphQL With Mercurius 5 min
  5. 05 GraphQL Codegen 4 min
  6. 06 undici — The Modern HTTP Client 4 min
  7. 07 Background Jobs With BullMQ 4 min
  8. 08 OpenTelemetry With Fastify 4 min
  9. 09 Clustering & Multi-Core 4 min
  10. 10 Microservices With Fastify 5 min

Section 07

Testing & Production

app.inject testing, supertest, Vitest, monitoring, Docker, deployment.

10 / 10 lessons
Chapter quiz 8 questions on Testing & Production
  1. 01 app.inject — Zero-Network Testing 4 min
  2. 02 supertest With Fastify 4 min
  3. 03 Testing With Vitest 4 min
  4. 04 Monitoring & Health Checks 4 min
  5. 05 Performance Tuning 5 min
  6. 06 Dockerizing Fastify 4 min
  7. 07 Deployment Targets 4 min
  8. 08 PM2 / systemd / Process Managers 4 min
  9. 09 Debugging 4 min
  10. 10 Going Further 3 min