use prisma orm for nestjs

This commit is contained in:
2023-03-18 21:42:15 +01:00
parent 60880abecd
commit a45bf5a110

View File

@ -1,12 +1,8 @@
[`NestJS 9`](https://nestjs.com/) implementation under `NodeJS` using [`Typescript`](https://www.typescriptlang.org/) and [`pnpm`](https://pnpm.io/) as fast package manager. It relies by default on [`express`](https://github.com/expressjs/express) as NodeJS HTTP server implementation. NestJS offers a nice OpenAPI documentation generator thanks to Typescript which provides strong typing. [`NestJS 9`](https://nestjs.com/) implementation under `NodeJS` using [`Typescript`](https://www.typescriptlang.org/) and [`pnpm`](https://pnpm.io/) as fast package manager. It relies by default on [`express`](https://github.com/expressjs/express) as NodeJS HTTP server implementation. NestJS offers a nice OpenAPI documentation generator thanks to Typescript which provides strong typing.
The separated ORM package take the best ideas from both known Doctrine and Eloquent PHP ORM :
* **DataMapper** pattern with POTO objects like Doctrine, with similar migrations generator.
* A **Model Factory** with seeder system for quick seeding dummy data inside database, with help of [Faker](https://github.com/faker-js/faker), as Laravel does.
Main packages involved : Main packages involved :
* [MikroORM](https://mikro-orm.io/) on **latest v5** as `DataMapper` ORM that relies on Typescript, including migrations and seeders with as dummy data generator * [Prisma](https://www.prisma.io/) as ORM entirely built up for Typescript. Include migrations, models generator based on specific schema specification
* [Faker](https://fakerjs.dev/) for generating seeders
* [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and code formatting * [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and code formatting
* [Jest](https://jestjs.io) as main test framework * [Jest](https://jestjs.io) as main test framework