mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-14 00:35:02 -05:00
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform: * Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder * Also rename `autogpt` to `original_autogpt` for absolute clarity * Rename `rnd/` to `autogpt_platform/` * `rnd/autogpt_builder` -> `autogpt_platform/frontend` * `rnd/autogpt_server` -> `autogpt_platform/backend` * Adjust any paths accordingly
16 lines
406 B
TypeScript
16 lines
406 B
TypeScript
import { PrismaClient } from "@prisma/client";
|
|
import { env } from "~/env.mjs";
|
|
|
|
const globalForPrisma = globalThis as unknown as {
|
|
prisma: PrismaClient | undefined;
|
|
};
|
|
|
|
export const prisma =
|
|
globalForPrisma.prisma ??
|
|
new PrismaClient({
|
|
log:
|
|
env.NODE_ENV === "development" ? ["query", "error", "warn"] : ["error"],
|
|
});
|
|
|
|
if (env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|