Join Slack
Powered by
i get this warning…. ```warn(prisma-client) Alread...
# orm-help
p
prisma chobo
08/10/2021, 12:21 AM
i get this warning….
Copy code
warn(prisma-client) Already 10 Prisma Clients are actively running.
prisma chobo
08/10/2021, 12:35 AM
import { PrismaClient } from ‘@prisma/client’; class Prisma { private static client: PrismaClient; static getClient() { if (!this.client) { this.client = new PrismaClient(); } return this.client; } } export default Prisma;
r
Ryan
08/10/2021, 6:00 AM
You would need to instantiate it like
this
.
7
Views
Open in Slack
Previous
Next