JavaScript NestJS SQL

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

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

NestJS SQL

API with NestJS #69. Database migrations with TypeORM

This entry is part 69 of 187 in the API with NestJS

When working with relational databases, we define the structure of the data rather strictly. For example, we need to specify the format of every table along with fields, relations, indexes, and other structures. By doing that, we also tell the database how to validate the incoming data. It is crucial to think about the structure […]

NestJS

API with NestJS #68. Interacting with the application through REPL

This entry is part 68 of 187 in the API with NestJS

The NestJS team officially announced NestJS 9 on July 8th. One of its features is Read-Eval-Print-Loop (REPL) implementation. It is an environment that allows us to interact with our NestJS application through the terminal. In this article, we go through how to set up REPL with NestJS. We also use features built into NodeJS to […]

NestJS

API with NestJS #67. Migrating to TypeORM 0.3

This entry is part 67 of 187 in the API with NestJS

For a long time, TypeORM seemed to have a reputation of being somewhat stagnant. Lately, they stepped up their game, though, and started releasing many new versions. When doing that, they introduced a large number of breaking changes. In this article, we go through the most significant differences between 0.2.x and 0.3.x versions so far […]