1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-20 20:21:18 -04:00

consolidate environment variable parsing

This commit is contained in:
2022-09-12 15:42:56 -04:00
parent 0373f806f6
commit c64d6cfb52
7 changed files with 434 additions and 412 deletions

View File

@@ -1,4 +1,5 @@
import { PrismaClient } from "@prisma/client";
import { IS_DEV_SERVER } from "../config/constants";
// PrismaClient is attached to the `global` object in development to prevent
// exhausting your database connection limit.
@@ -18,4 +19,4 @@ export const prisma =
log: ["query"],
});
if (process.env.IS_DEV_SERVER === "true") global.prisma = prisma;
if (IS_DEV_SERVER) global.prisma = prisma;