initial commit

This commit is contained in:
andres
2023-05-21 14:52:08 +02:00
commit 268ef59b3d
27 changed files with 6025 additions and 0 deletions

15
src/prisma.service.ts Normal file
View File

@@ -0,0 +1,15 @@
import { INestApplication, Injectable, OnModuleInit } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
@Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect();
}
async enableShutdownHooks(app: INestApplication) {
this.$on('beforeExit', async () => {
await app.close();
});
}
}