mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-20 20:21:18 -04:00
edge functions didn't make sense for database calls
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { PrismaClient } from "@prisma/client/edge";
|
||||
import { withAccelerate } from "@prisma/extension-accelerate";
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
|
||||
// creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the
|
||||
// number of connection pools available (especially when hot reloading from `next dev`).
|
||||
// https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
|
||||
|
||||
const prismaClientSingleton = () => {
|
||||
return new PrismaClient().$extends(withAccelerate());
|
||||
return new PrismaClient();
|
||||
};
|
||||
|
||||
type PrismaClientSingleton = ReturnType<typeof prismaClientSingleton>;
|
||||
|
Reference in New Issue
Block a user