typeorm

software engineering

How to create pagination in Nest.js with TypeORM + Swagger

Pagination is a very important part of your API. It requires and is used in almost every CRUD application. In this article, I'll show you how to design it well using the Nest.js framework and TypeORM. In addition, I will correctly display it in Swagger, because it turns out that it is not so simple. 🧐

Read - 8 min read
IT security

🚨 How to hack your Node.js application (which uses TypeORM)?

Among Node.js developers there is a constant struggle to choose the best ORM library. I most often choose TypeORM in my projects and although I think it is the best ORM, it has its drawbacks. In today's article, I'll show you how you can stupidly make a huge mistake and let your application be hacked by accidentally granting root access. It may sound spicy, but it is! 🌶

Read - 6 min read

Virtual Column solutions for TypeORM

If you are an experienced Node.js developer and use the TypeORM library in your project, you must have encountered the problem of creating a virtual field in the data model. We need this field in order to be able to return an additional result in the response, but we don't want to store it directly in the database. What you are most likely looking for should be named .addSelectAndMap(), @VirtualColumn() or Computed Column decorator.

Read - 10 min read