wip fix
This commit is contained in:
parent
3b983c1cea
commit
5b13c3c911
|
|
@ -8,8 +8,12 @@ export const preparePrisma = async () => {
|
|||
if (!(await existsAsync(dir("node_modules/.prisma")))) {
|
||||
await $({ cwd: dir(`app/db`) })`bun prisma generate`;
|
||||
}
|
||||
try {
|
||||
const { PrismaClient } = await import("../../app/db/db");
|
||||
g.db = new PrismaClient();
|
||||
} catch (e) {
|
||||
console.log("Prisma not initialized");
|
||||
}
|
||||
}
|
||||
|
||||
g.dburl = process.env.DATABASE_URL || "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue