ar bg de en es fr id it nl pl pt sv tr zh

fastify

Handling HTTP timeouts in Fastify

Manuel Spigolon

The hardest part of my job is thinking like a malicious user... or like an AI in its early stages of writing HTTP servers!This exercise is not easy because I love my clients' HTTP requests, and I'm sure they love my server!But that is not always the case... for this reason, we must be prepared to...

Managing Request-Scoped Data in Fastify

Manuel Spigolon

I was looking at the Fastify plugin list and found myself asking, "What is this @fastify/request-context plugin?"So, I checked it out, and here I am, writing a post about it to share what it is and how it can be useful for you! What is AsyncLocalStorage? Managing state across asynchronous...

Announcing the Fastify Mini Course

Manuel Spigolon

Dear Backend.cafe readers, I have something special for you! If you've ever wanted to master Fastify, the lightning-fast Node.js framework, you're in for a treat. Today, I’m launching Fastify Mini Course—a free resource designed to help you build high-performance APIs efficiently. 🚀 Why Fastify?...

Master Node.js with the 5th Edition Cookbook

Manuel Spigolon

We are excited to announce that the Node.js Cookbook, 5th Edition is set to be released on November 15th, 2024! This latest edition, authored by Bethany Griggs, is the ultimate guide for developers who want to master the Node.js v22 API and build scalable, high-performance applications. The...

Fastify has a new Application Hook!

Manuel Spigolon

Fastify v4.23.0 has just been released, featuring a brand-new onListen Application hook. In this article, we'll explore what it is and how you can leverage it in your Fastify applications. Understanding Fastify hooks Fastify's hooks are a fundamental aspect of its design. Hooks are functions that...

Streaming PostgreSQL data with Fastify

Manuel Spigolon

In recent years, we have been surrounded by cool, interactive data visualizations. These visualizations are powered by datasets stored in databases and made available through APIs. Clients can then query the API and get the data they need to render the visualization. But what happens when the...

The Fastify book is out!

Maksim Sinik

Are you a mid/expert back-end engineer looking to build highly scalable and maintainable API servers? Are you already familiar with Node.js and other back-end frameworks? If so, then "Accelerating Server-Side Development with Fastify" is the book you've been waiting for! About the Authors: Meet...

Validate the Fastify input with Joi

Manuel Spigolon

If you are an hapi developer, you may know the joi library. It is a powerful validation library that allows you to define programmatic schemas for your data and validate them with ease. One of the hardest things about migrating from hapi to fastify is the complexity that’s involved for you to be...

Unlock the Power of Runtime Log Level Control

Manuel Spigolon

As a backend developer, logging is essential to monitoring and debugging applications. Traditionally, changing an application's log level required restarting it or modifying the configuration and redeploying it. However, there are scenarios where changing the log level at runtime becomes necessary...

Dynamic GraphQL queries with Mercurius

Manuel Spigolon

If you're using Fastify with Mercurius as your GraphQL adapter, you may be looking for some advanced usages. In this article, we'll explore a real world example with Dynamic GQL queries with Mercurius. The example we will discuss is only one scenario that you may encounter as Software Engineer at...