https://github.com/leosuncin/nest-typeorm-custom-repository
TypeORM with a Custom Repository
https://github.com/leosuncin/nest-typeorm-custom-repository
example-project nestjs nodejs sqlite3 supertest typeorm typescript
Last synced: 4 months ago
JSON representation
TypeORM with a Custom Repository
- Host: GitHub
- URL: https://github.com/leosuncin/nest-typeorm-custom-repository
- Owner: leosuncin
- License: mit
- Created: 2019-07-08T23:53:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-23T19:14:36.000Z (4 months ago)
- Last Synced: 2025-02-25T08:44:55.387Z (4 months ago)
- Topics: example-project, nestjs, nodejs, sqlite3, supertest, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 1.79 MB
- Stars: 54
- Watchers: 4
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🗄️ Nest.js + TypeORM with a Custom Repository
[](https://github.com/leosuncin/nest-typeorm-custom-repository/actions/workflows/mega-linter.yml)
[](https://github.com/leosuncin/nest-typeorm-custom-repository/actions/workflows/tests.yml)

[](./LICENSE)
[](https://hits.dwyl.com/leosuncin/nest-typeorm-custom-repository)> 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](https://github.com/leosuncin/nest-typeorm-custom-repository/tree/v1.0.0)## Features
- [TypeORM](https://typeorm.io/) with custom repository
- Unit tests and E2E tests
- Check code quality with [MegaLinter](https://oxsecurity.github.io/megalinter/latest/)
- Run tests with [github actions](.github/workflows/tests.yml)## Run Locally
Clone the project
```bash
git clone https://github.com/leosuncin/nest-typeorm-custom-repository.git
```Go to the project directory
```bash
cd nest-typeorm-custom-repository
```Install dependencies
```bash
yarn install
```Start the server
```bash
yarn start:dev
```## Running Tests
To run unit tests, run the following command:
```bash
pnpm test
```To run e2e tests (the MySQL instance must be available), run the following command:
```bash
pnpm test:e2e
```## Tech Stack
**Server:** Typescript, SQLite, Nest.js, TypeORM
**Test:** Jest, SuperTest
## Author
👤 **Jaime Leonardo Suncin Cruz**
- Twitter: [@jl_suncin](https://twitter.com/jl_suncin)
- Github: [@leosuncin](https://github.com/leosuncin)
- LinkedIn: [@jaimesuncin](https://linkedin.com/in/jaimesuncin)## Show your support
Give a ⭐️ if this project helped you!
## Related
Here are some more example projects with Nest.js
[](https://github.com/leosuncin/nest-auth-example)
[](https://github.com/leosuncin/nest-api-example)
[](https://github.com/leosuncin/nest-graphql-example)
## License
Release under the terms of [MIT](./LICENSE)