🐈

NestJS

NestJS is a structured, TypeScript-first Node.js framework created by Kamil Myśliwiec and maintained by an active open-source community. It's the #19 most-used web framework, reported in roughly 6.7% of developer surveys. Its architecture is heavily inspired by Angular — built-in dependency injection, decorators, and a module system — sitting on top of Express or Fastify under the hood, which makes it a popular choice for teams building large, maintainable backend codebases that need more structure than a minimal framework provides.

Quick facts
Type: Backend Node.js framework
Made by: Kamil Myśliwiec / open-source community
License: Free / open-source (MIT)
Language: TypeScript
Primary use case: Large, structured backend APIs and microservices that need built-in dependency injection and modularity
Jump to: ExampleGetting startedBest for

Example

A NestJS controller class uses decorators like `@Controller` and `@Get` to declare routes, and constructor-based dependency injection to receive services.

// cats.controller.ts
import { Controller, Get, Param, Post, Body } from '@nestjs/common';
import { CatsService } from './cats.service';

@Controller('cats')
export class CatsController {
  constructor(private readonly catsService: CatsService) {}

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.catsService.findOne(+id);
  }

  @Post()
  create(@Body() dto: { name: string }) {
    return this.catsService.create(dto);
  }
}

Getting started

Scaffold a new project with the official Nest CLI, which sets up the module/controller/service boilerplate for you.

# install the CLI and create a new project
npm i -g @nestjs/cli
nest new my-app

cd my-app
npm run start:dev
Best for: Backend teams building large APIs or microservices in TypeScript who want enforced architecture and testability from day one, rather than assembling structure themselves on top of bare Express.