first commit

This commit is contained in:
2025-05-11 17:44:59 +08:00
commit ec8d216e12
55 changed files with 19655 additions and 0 deletions

12
nest-websocket/lib/db.ts Normal file
View File

@@ -0,0 +1,12 @@
import { PrismaClient } from '@prisma/client';
declare global {
// eslint-disable-next-line no-var
var prisma: PrismaClient | undefined;
}
export const db = globalThis.prisma || new PrismaClient();
if (process.env.NODE_ENV !== 'production') {
globalThis.prisma = db;
}