aboutsummaryrefslogtreecommitdiffstats
path: root/packages/db/index.ts
blob: 4a0f473f69f2ab7ae455bd4e7a80d19d59735c15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient({
    log:
        process.env.NODE_ENV === "development"
            ? ["query", "error", "warn"]
            : ["error"],
});

// For some weird reason accessing @prisma/client from any package is causing problems (specially in error handling).
// Re export them here instead.
export * from "@prisma/client";

export default prisma;