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 […]

NestJS SQL

API with NestJS #69. Database migrations with TypeORM

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

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 […]