A progressive Node.js framework for efficient, scalable backends
open sourceMITfree
NestJS (Nest) is a framework for building efficient, scalable Node.js server-side applications, from a small API in one file to enterprise-grade systems with many teams. It is built with and fully supports TypeScript, and structures an app into modules, controllers and providers wired together by dependency injection and TypeScript decorators, an architecture inspired by Angular. Under the hood it runs on Express by default, or on Fastify or Node's own node:http, and exposes their APIs directly, so their middleware still works. First-party packages cover microservices transports, WebSockets, GraphQL, testing and more, and the Nest CLI scaffolds and builds projects. The team behind it also sells enterprise support, courses, Devtools, an observability product and Mau, a deployment service for AWS.
Problems it solves
- an opinionated structure for a large Node.js backend so every team writes services the same way
- dependency injection and modules in a TypeScript backend
- my Express app has grown into an unmaintainable tangle of routes and middleware
- build microservices in Node.js that talk over Redis, NATS, Kafka or gRPC
- an Angular-style architecture for my Node.js server
- build a GraphQL or REST API in TypeScript with decorators for routes and validation
- write testable backend code in Node with mockable providers
- switch my Node.js web server between Express and Fastify without rewriting controllers
Features
- modules, controllers and providers
- built-in dependency injection
- TypeScript decorators
- runs on Express, Fastify or node:http
- microservices transports
- WebSockets gateways
- GraphQL integration
- testing utilities
- Nest CLI for scaffolding and builds
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what NestJS does.