Category: NestJS


API with NestJS #145. Securing applications with Helmet

This entry is part 145 of 156 in the API with NestJS

Ensuring that our application is secure is one of the most important things we must do as developers. One of the ways to protect our application from well-known vulnerabilities is to set appropriate response headers. There are quite a lot of different security-related response headers to consider. Fortunately, the helmet library can set them for […]


API with NestJS #144. Creating CLI applications with the Nest Commander

This entry is part 144 of 156 in the API with NestJS

Command Line Applications are very useful for developers. We can interact with them by executing specific commands in the terminal, giving us much control and flexibility. You probably already interact with various CLI applications, such as Git or NPM. Interestingly, we can also use NestJS to create a Command Line Interface (CLI) application. In this […]


API with NestJS #142. A video chat with WebRTC and React

This entry is part 142 of 156 in the API with NestJS

Let’s say two people want to video chat using our app. One solution would be for the first person to stream their camera feed to our server. Then, our application would pass this data to the other caller. Unfortunately, our application acting as a middleman could introduce a significant lag, especially if our server is […]


API with NestJS #140. Using multiple PostgreSQL schemas with Prisma

This entry is part 140 of 156 in the API with NestJS

In PostgreSQL, schemas act as namespaces within the database and are containers for objects such as tables and indexes. In this article, we explain how they work and what are their benefits. We also provide examples of how to use them with Prisma. The public schema PostgreSQL creates a schema called out of the […]


API with NestJS #139. Using UUID as primary keys with Prisma and PostgreSQL

This entry is part 139 of 156 in the API with NestJS

Each record in our database should have a unique identifier. Typically, we use a numerical sequence to generate them. However, we can use an alternative approach that includes Universally Unique Identifiers (UUID). In this article, we discuss their advantages and disadvantages and implement them in a project with NestJS, Prisma, and PostgreSQL. For the full […]


API with NestJS #138. Filtering records with Prisma

This entry is part 138 of 156 in the API with NestJS

Filtering records is one of the essential skills to have when working with SQL databases. In this article, we’ll implement various examples using NestJS and Prisma to show how to filter the data in different cases. Thanks to that, we will learn how to find precisely the data we need quickly and easily. Implementing a […]