Category: JavaScript

JavaScript NestJS SQL

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

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

JavaScript Testing

Introduction to performance testing with k6

Writing unit and integration tests is a great way to verify the business logic in our code. Unfortunately, it might not be enough to ensure that our application works as expected in a real-life scenario. When hundreds, thousands, or millions of users use our API, it strains it. We simulate the above circumstances through performance […]

React

Rendering long lists using virtualization with React

When working on web applications, we often display lists of data. If the data is not particularly lengthy, we are probably okay with rendering all elements at once. However, as our data grows, we might notice performance issues. In this article, we create a simple React application that aims to render thousands of images using […]

JavaScript NestJS

API with NestJS #62. Introduction to MikroORM with PostgreSQL

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