๐Ÿ—„๏ธ Nest.js + TypeORM with a Custom Repository

July 23, 2022 ยท View on GitHub

MegaLinter Tests Prettier MIT License HitCount

An example of how to use a custom repository of TypeORM within Nest.js
๐Ÿšจ NOTICE ๐Ÿšจ this example now works with TypeORM v0.3.x for previous version check out v1.0.0

Nest Logo

Features

Run Locally

Clone the project

  git clone https://github.com/leosuncin/nest-typeorm-custom-repository.git

Go to the project directory

  cd nest-typeorm-custom-repository

Install dependencies

  yarn install

Start the server

  yarn start:dev

Running Tests

To run unit tests, run the following command:

  pnpm test

To run e2e tests (the MySQL instance must be available), run the following command:

  pnpm test:e2e

Tech Stack

Server: Typescript, SQLite, Nest.js, TypeORM

Test: Jest, SuperTest

Author

๐Ÿ‘ค Jaime Leonardo Suncin Cruz

Show your support

Give a โญ๏ธ if this project helped you!

Here are some more example projects with Nest.js

Authentication example

API example

GraphQL example

License

Release under the terms of MIT