From ef916e7d56beec48605896bbdeb4c05066200cf4 Mon Sep 17 00:00:00 2001 From: Supan Adit Pratama Date: Tue, 29 Oct 2024 02:22:40 +0700 Subject: [PATCH] chore: update readme.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 2ab9c6b..b905a00 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,33 @@ Nest Auto CRUD is a library that provides a set of modules, decorator, service, $ npm install @aditama-labs/nest-autocrud ``` +## Example + +### Prisma ORM + +```typescript +// Your Module +@Module({ + imports: [ + // This is the magic + PrismaModule.forRoot({ + delegate: (prisma) => prisma.user, + }), + ], + controllers: [AppController], + providers: [AppService], +}) +export class AppModule {} + +// Your Controller +@Controller('examples') +export class AppController extends SkeletonCRUDController {} +``` + +### TypeORM + +_COMING SOON_ + ## Support Nest AutoCRUD is an MIT-licensed open source project.