Attempt to at move app into app sub dir
This commit is contained in:
21
app/api/src/lib/db.js
Normal file
21
app/api/src/lib/db.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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 './logger'
|
||||
|
||||
/*
|
||||
* Instance of the Prisma Client
|
||||
*/
|
||||
export const db = new PrismaClient({
|
||||
log: emitLogLevels(['info', 'warn', 'error']),
|
||||
})
|
||||
|
||||
handlePrismaLogging({
|
||||
db,
|
||||
logger,
|
||||
logLevels: ['info', 'warn', 'error'],
|
||||
})
|
||||
Reference in New Issue
Block a user