Highly performant
One of the fastest web frameworks in town. Depending on code complexity, Fastify can serve around 90 thousand requests per second.
GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing fastify.dev — Fastify — Fast and low overhead web framework, for Node.js Fastify v5.x · Node.js 20+ A fast, low-overhead web framework for Node.js.Highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture.
Get started
$ npm install fastify
throughput 1.3x vs express TS types included // why fastify Efficiency is a featureAn efficient server keeps your infrastructure costs low, stays responsive under load, and leaves your users happy. Fastify is built to serve as many requests as possible without compromising on security, validation, or developer experience. Inspired by Hapi and Express, it's one of the fastest web frameworks around. // core features Core strengths~90k req/s Highly performantOne of the fastest web frameworks in town. Depending on code complexity, Fastify can serve around 90 thousand requests per second. hooks · plugins ExtensibleFully extensible via its hooks, plugins, and decorators. Encapsulation keeps your components isolated and reusable. JSON Schema Schema basedUse JSON Schema to validate routes and serialize outputs. Internally Fastify compiles the schema into a highly performant function. Pino built-in LoggingLogs are important but costly. We chose the fastest logger, Pino, to almost entirely remove that cost. DX first Developer friendlyExpressive by design, built to help developers in daily use without sacrificing performance or security. types included TypeScript readyWe work hard to maintain a TypeScript type declaration file to support the growing TypeScript community. // quick start Type-safe from the startInstall Fastify and TypeBox, then create $ npm install fastify @fastify/type-provider-typebox typeboximport Fastify from 'fastify'
import { Type } from 'typebox'
import type { TypeBoxTypeProvider } from '@fastify/type-provider-typebox'
const fastify = Fastify({ logger: true })
.withTypeProvider<TypeBoxTypeProvider>()
fastify.get('/', {
schema: {
querystring: Type.Object({
name: Type.Optional(Type.String()),
}),
response: {
200: Type.Object({
hello: Type.String(),
}),
},
},
}, async (request) => {
return { hello: request.query.name ?? 'world' }
})
await fastify.listen({ port: 3000 }) // benchmarks Fast, from the ground upLeveraging deep experience with Node.js performance, Fastify was built to be as fast as possible. Compare it against other common frameworks. See full benchmarksFastify5.12.7 89,733 Hono4.13.14 84,930 H32.0.8 80,974 Koa3.2.1 72,594 Restify12.1.0 69,162 Express5.3.0 67,794 Hapi21.4.11 65,114 req/s · higher is better · illustrative comparison // ecosystem A plugin for everythingAn ever-growing ecosystem of 277 plugins. There's probably already one for your database or template engine — and it's very easy to write your own. @fastify/corsofficialEnables the use of CORS in a Fastify application. @fastify/staticofficialPlugin for serving static files as fast as possible. @hey-api/openapi-tscommunityThe OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. @fastify/otelofficialOpenTelemetry instrumentation library. @fastify/cookieofficialParse and set cookie headers. @fastify/rate-limitofficialA low overhead rate limiter for your routes. // maintainers Built by the communityFastify is an OpenJS Foundation project maintained by a global team of lead maintainers and collaborators. // lead maintainers The team// active Collaborators// alumni Past collaboratorsReady to go fast?Ship a production-grade API today. Start with the guide, or dive into the reference. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |