All quizzes
Free quiz · 48 questions in the bank

Fastify quiz

Test your Fastify knowledge with a free interactive quiz — 48 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What is the effect of specifying a `response` schema for status code 200 on a Fastify route?

In this round
  1. What is the effect of specifying a `response` schema for status code 200 on a Fastify route?
  2. Why would a Fastify app use `@fastify/cors` instead of hand-writing CORS header logic in every route?
  3. What does `app.decorate('db', pool)` do?
  4. What is Fastify?
  5. What plugin/hook type would you use to run authentication logic before every route handler in a specific plugin scope?
  6. What does `fastify.close()` do?
  7. In a Fastify route handler declared as `async (request, reply) => {...}`, how do you send a JSON response?
  8. What is the correct way to read a custom request header, e.g. `x-api-key`, in a Fastify handler?
  9. What type of value does a Fastify route handler return when it wants Fastify to send a 404 response?
  10. What logging library does Fastify use internally by default, exposed via request.log?
  11. What does the querystring schema in a Fastify route definition validate?
  12. How do you set a custom HTTP status code before sending a response in Fastify?
Gaps to close?
Read the curated Fastify notes — core concepts, patterns, interview prep.
Fastify notes

More quizzes

.NETAccessibilityAgile MethodologyAirflowAlertmanagerAlgorithms