NestJS Platforms: Express vs. Fastify

Learn and practice using Fastify in NestJS and understand the differences from Express.

NestJS platforms

NestJS uses Express as the underlying platform by default but can also work with other NodeJS HTTP frameworks. This is because NestJS implements a framework adapter that abstracts away the platform-specific details in middleware and request handling.

The out-of-the-box alternative framework is Fastify. Fastify is known for its exceptional speed and low overhead, making it a great choice for high-performance applications. On the other hand, Express has a robust ecosystem and is widely adopted, making it suitable for a wide range of use cases.

Use Fastify in NestJS

To use Fastify, we need to install the following package:

Get hands-on with 1200+ tech skills courses.