TypeORM Integration

Now it's time to make our system communicate with the database with the help of TypeORM.

TypeORM is a robust ORM that, as the name suggests, focuses on TypeScript. It is very similar to Java's ORM Hibernate in design. Since it's considered one of the most mature ORMs in the Node.js ecosystem, we will adopt it throughout this course.

A module focusing on Prisma is available in the full course.

To use TypeORM, we should first install the required dependencies.

yarn add @nestjs/typeorm typeorm pg

In the next sections, we'll see how to integrate it with our system.

Last updated