Series: API with NestJS


API with NestJS #61. Dealing with circular dependencies

This entry is part 61 of 66 in the API with NestJS

We need to watch out for quite a few pitfalls when designing our architecture. One of them is the possibility of circular dependencies. In this article, we go through this concept in the context of Node.js modules and NestJS services. Circular dependencies in Node.js modules A circular dependency between Node.js modules happens when two files […]

JavaScript NestJS

API with NestJS #62. Introduction to MikroORM with PostgreSQL

This entry is part 62 of 66 in the API with NestJS

So far, in this series, we’ve used a few different solutions for managing databases. To work with MongoDB, we’ve used Mongoose. To manage a PostgreSQL database, we’ve utilized TypeORM and Prisma. This article looks into another Object-relational mapping (ORM) library called MikroORM. By having a broad perspective on what’s available, we can choose the library […]


API with NestJS #63. Relationships with PostgreSQL and MikroORM

This entry is part 63 of 66 in the API with NestJS

A significant advantage of SQL databases is handling relationships between various tables. Since, in web applications, entities often relate to each other, designing relationships is a big part of working with SQL databases. In this article, we continue learning MikroORM and use it to form relationships. You can find the code from this article in […]


API with NestJS #64. Transactions with PostgreSQL and MikroORM

This entry is part 64 of 66 in the API with NestJS

One of the most important things to care about as a web developer is the integrity of the data. In this article, we learn what a transaction is and how it can help us ensure that our data is correct. The idea behind transactions A transaction is a set of instructions that either happens entirely […]