basic url short functionality

This commit is contained in:
Philipp Traber
2024-09-12 10:02:27 +02:00
parent 0cebfea362
commit e882565a71
19 changed files with 1151 additions and 246 deletions
+14
View File
@@ -0,0 +1,14 @@
import { PrismaClient } from '@prisma/client';
let prisma: PrismaClient;
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient();
} else {
if (!global.prisma) {
global.prisma = new PrismaClient();
}
prisma = global.prisma;
}
export default prisma;