Data validation in NestJS using “Pipe”

Introduction to Nest.js “Pipe” Pipes in NestJS are special components used to transform and validate data before it reaches the controller or controller methods. Pipes are useful when we want to ensure that the data we receive in API requests meets certain conditions or is transformed in a specific way. Nest.js comes with built-in pipes … Read more

Nest.js controllers

What are controllers? Controllers in Nest.js are classic TypeScript classes that are decorated with the @Controller() decorator. In such classes, methods corresponding to HTTP operations such as GET, POST, PUT, DELETE are defined, where each method within the controller is decorated with a corresponding HTTP decorator. Example of a simple controller:

In this example, … Read more

Introduction to Nest.js

What is Nest.js? Nest.js is a Node.js framework for creating server-side applications. It uses modular architecture, which means that the application is divided into modules, where each module groups related functionality, so that new functionalities can be easily added without disrupting the existing parts of the application. Nest.js uses the TypeScript language (although JavaScript can … Read more