增加数据库
Docker Build and Push / build-image (push) Failing after 6m27s

This commit is contained in:
cheney
2026-04-09 22:07:23 +08:00
parent 982519e701
commit 4c7f600a6b
25 changed files with 9739 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import { PrismaClient } from '../generated/prisma'
let prisma
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.prisma) {
global.prisma = new PrismaClient()
}
prisma = global.prisma
}
export default prisma