All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 39s
25 lines
532 B
TypeScript
Executable File
25 lines
532 B
TypeScript
Executable File
// See https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/constructor
|
|
// for options.
|
|
|
|
import { PrismaClient } from '@prisma/client'
|
|
|
|
import { emitLogLevels, handlePrismaLogging } from '@redwoodjs/api/logger'
|
|
|
|
import { logger } from 'src/lib/logger'
|
|
|
|
/*
|
|
* Instance of the Prisma Client
|
|
*/
|
|
|
|
const prismaClient = new PrismaClient({
|
|
log: emitLogLevels(['info', 'warn', 'error'])
|
|
})
|
|
|
|
handlePrismaLogging({
|
|
db: prismaClient,
|
|
logger,
|
|
logLevels: ['info', 'warn', 'error'],
|
|
})
|
|
|
|
export const db = prismaClient
|