Skip to content

leosuncin/nest-typeorm-custom-repository

Repository files navigation

🗄️ Nest.js + TypeORM with a Custom Repository

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!

Related

Here are some more example projects with Nest.js

Authentication example

API example

GraphQL example

License

Release under the terms of MIT