Category: JavaScript

JavaScript NestJS SQL

API with NestJS #76. Working with transactions using raw SQL queries

This entry is part 76 of 77 in the API with NestJS

One of the challenges when working with databases is keeping the integrity of the data. In this article, we learn how to deal with it using transactions. A transaction can contain multiple different instructions. The crucial thing about a transaction is that it either runs entirely or doesn’t run at all. Let’s revisit the most common […]

JavaScript NestJS SQL

API with NestJS #75. Many-to-many relationships using raw SQL queries

This entry is part 75 of 77 in the API with NestJS

Designing relationships between tables is one of the crucial parts of working with databases. In this article, we look into a more complex relationship called many-to-many. You can find the code from this article in this repository. The many-to-many relationship A many-to-many relationship happens when many records in one table relate to many records in another […]

JavaScript NestJS SQL

API with NestJS #74. Designing many-to-one relationships using raw SQL queries

This entry is part 74 of 77 in the API with NestJS

Learning how to design and implement relationships between tables is a crucial skill for a backend developer. In this article, we continue working with raw SQL queries and learn about many-to-one relationships. You can find the code from this article in this repository. Understanding the many-to-one relationship When creating a many-to-one relationship, a row from […]

JavaScript NestJS

API with NestJS #71. Introduction to feature flags

This entry is part 71 of 77 in the API with NestJS

With feature flags (also referred to as feature toggles), we can modify our application’s behavior without changing the code. In this article, we explain the purpose of feature flags. We also show how to implement them ourselves and discuss the pros and cons. You can find the code from this article in this repository. The […]

JavaScript NestJS

API with NestJS #70. Defining dynamic modules

This entry is part 70 of 77 in the API with NestJS

So far in this series, we’ve defined many different modules that can group provides and controllers. None of them was customizable, though. In this article, we learn how to create dynamic modules that are customizable, making them easier to reuse. While doing that, we rewrite some of our old code to use dynamic modules. If […]