add branch tout-savoir

This commit is contained in:
cedric committed 2022-12-07 11:59:38 +01:00
1 parent a75221ba0f
commit 5d5adbdc35
150 files changed
+17747

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { PrismaClient } from "@prisma/client";
declare let global: { prisma: PrismaClient };
// PrismaClient is attached to the `global` object in development to prevent
// exhausting your database connection limit.
//
// Learn more:
// https://pris.ly/d/help/next-js-best-practices
let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.prisma) {
global.prisma = new PrismaClient()
}
prisma = global.prisma
}
export default prisma