BT

InfoQ Homepage News Fastify Node.js Web Framework

Fastify Node.js Web Framework

Bookmarks

Fastify is an open-source Node.js web framework that remains focused on providing excellent developer experience, minimal performance overhead, and a flexible plugin architecture.

Fastify's development efforts are focused on six main features and principles. First, as its name suggests, Fastify is focused on speed, and can currently serve up to 30,000 requests per second.

Fastify provides extensibility via hooks, plugins, and decorators.

The Fastify project strongly recommends the option of using JSON Schema to validate routes and serialize outputs to improve performance and accuracy.

Fastify leverages Pino, a very low overhead Node.js logger, for logging.

Fastify strives to be friendly for developers, with a focus on expressive code without sacrificing performance and security.

While not a TypeScript framework, Fastify is TypeScript-ready with full support for TypeScript type definitions.

Getting started with Fastify requires installation via npm:

npm install fastify

Fastify then provides APIs for working with routes, running the server, request/response validation and hooks, lifecycle management, middleware, error handling, content parsing, and much more.

The Fastify ecosystem has more than 100 core and community plugins supporting a wide range of features.

Fastify Performance benchmarks exist comparing Fastify to Koa, Express, Restify, and Hapi. 

Fastify is open source software available under the MIT license and is part of the OpenJS Foundation. Contributions are welcome and should follow the Fastify contribution guidelines and code of conduct.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.