Node.js · Middle · Question 32 of 75
What is a key feature of Fastify compared with Express?
- 1It runs only on Bun
- 2It doesn't support middleware or hooks
- ✓Correct answer: JSON Schema for validation and fast serialization, and an encapsulated plugin system
Explanation
Fastify compiles schemas into fast validators and serializers, logs with Pino by default and uses hooks (onRequest, preHandler, ...) for the request lifecycle.