You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kubsu-platform-crud-2023/apps/auth/src/prisma/service/prisma.service.ts

16 lines
409 B

import { INestApplication, Injectable, OnModuleInit } from "@nestjs/common";
import { AuthClient } from "@platform/prisma-clients";
@Injectable()
export class PrismaService extends AuthClient implements OnModuleInit {
async onModuleInit() {
await this.$connect();
}
async enableShutdownHooks(app: INestApplication) {
this.$on("beforeExit", async () => {
await app.close();
});
}
}