Categories
Fastify Node.js

Use Fastify hooks to set headers on every response

4 min read Jump links Fastify hooks and encapsulation contexts Example of an onSend hook Set headers for a collection of routes Set headers for all server routes Approach 1: Register an onSend hook in the server’s root context Approach 2: Register an onSend hook inside a plugin and wrap it with fastify-plugin Useful links

Categories
Fastify Videos

Workshop recording: Get Started with Fastify

< 1 min read

Categories
Fastify Learning Fastify Node.js Videos

Learning Fastify: How to migrate your app from Express to Fastify

< 1 min read Links

Categories
Fastify Node.js

How to migrate your app from Express to Fastify

12 min read Jump links What are the benefits of migrating from Express to Fastify? How to Migrate an API with Confidence Transitioning from Express to Fastify with fastify-express Our Example Express Application Required dependencies The router module The app module The server module Running our application Migrating Our Application from Express to Fastify Required dependencies Refactoring our […]

Categories
Fastify Node.js Videos

Talk: Make the most of modern JavaScript with Fastify (2021-02-25)

< 1 min read