initial wcag-ada
This commit is contained in:
parent
042b8cb83a
commit
d52cfe7de2
112 changed files with 9069 additions and 0 deletions
12
apps/wcag-ada/api/src/utils/prisma.ts
Normal file
12
apps/wcag-ada/api/src/utils/prisma.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { PrismaClient } from '@prisma/client';
|
||||
import { appConfig } from '../config';
|
||||
|
||||
const globalForPrisma = global as unknown as { prisma: PrismaClient };
|
||||
|
||||
export const prisma =
|
||||
globalForPrisma.prisma ||
|
||||
new PrismaClient({
|
||||
log: appConfig.environment === 'development' ? ['query', 'error', 'warn'] : ['error'],
|
||||
});
|
||||
|
||||
if (appConfig.environment !== 'production') globalForPrisma.prisma = prisma;
|
||||
Loading…
Add table
Add a link
Reference in a new issue