Series: API with NestJS

NestJS

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

This entry is part 142 of 183 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 […]

NestJS

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

This entry is part 144 of 183 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 […]

NestJS

API with NestJS #145. Securing applications with Helmet

This entry is part 145 of 183 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 […]

JavaScript NestJS

API with NestJS #148. Understanding the injection scopes

This entry is part 148 of 183 in the API with NestJS

When a NestJS application starts, it creates instances of various classes, such as controllers and services. By default, NestJS treats those classes as singletons, where a particular class has only one instance. NestJS then shares the single instance of each provider across the entire application’s lifetime, creating a singleton provider scope. If you want to […]

NestJS SQL

API with NestJS #150. One-to-one relationships with the Drizzle ORM

This entry is part 150 of 183 in the API with NestJS

When building a database, the tables we set up often connect to each other. Managing these relationships is one of the crucial parts of working with databases. In the previous article, we learned how to use NestJS with Drizzle to set up a simple project with PostgreSQL. This time, we go further and write more […]