What Is NestJS?

Get introduced to NestJS.

In this lesson, we’ll explore the key components of NestJS and why developers choose this powerful framework. We’ll learn about the building blocks, such as modules, controllers, services, and more, that make NestJS a popular choice for web development.

NestJS architecture

NestJS uses a modular architecture that enables developers to generate reusable code and organize individual modules for specific concerns. Here are some building blocks in NestJS:

  • Modules: A module is a class mark with the @Module() decorator. It serves as a container for related controllers, providers, and other related codes. NestJS provides a powerful module system that allows developers to create reusable modules and organize their code.

  • Controllers: A controller is responsible for handling incoming requests and returning responses to the client. It is a TypeScript class annotated with the @Controller() decorator. Controllers are used to define ...