In this chapter, we'll learn about setting up a repository layer using Postgres as our database and TypeORM as our library for accessing the database. We'll build our database schema and, with the help of TypeORM, we'll be able to perform CRUD (Create, Read, Update, Delete) operations for our application. This is a crucial chapter as the core activity of our backend will be to retrieve and update data.
In this chapter, we're going to cover the following main topics:
- Setting up our Postgres database
- Understanding object relational mappers by using TypeORM
- Building our repository layer using Postgres and TypeORM