Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "dotenv/config";
- import { PrismaClient } from "@prisma/client";
- import { PrismaPg } from "@prisma/adapter-pg";
- import pg from "pg";
- const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL || "" });
- const adapter = new PrismaPg(pool);
- const prisma = new PrismaClient({ adapter });
- export { prisma, pool };
Advertisement
Add Comment
Please, Sign In to add comment