diff options
| author | Maze <167211895+mazeincoding@users.noreply.github.com> | 2025-07-15 12:20:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-15 12:20:55 +0200 |
| commit | 0e83b6c15eb0318cf5c53373492a6740e521eb24 (patch) | |
| tree | 0ece838aaaf4071a8ed32804d04edfef0076fec3 /apps/web/drizzle.config.ts | |
| parent | d7c764f96884284ae6424c3a39f87688faf9af5d (diff) | |
| parent | 9d5fb821c75dd2f0c0d3da6fb427db966d3c7358 (diff) | |
| download | opencut-0e83b6c15eb0318cf5c53373492a6740e521eb24.tar.gz | |
Merge pull request #272 from vietnamesekid/main
feat: integrate @t3-oss/env for environment variable management across the application
Diffstat (limited to 'apps/web/drizzle.config.ts')
| -rw-r--r-- | apps/web/drizzle.config.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/web/drizzle.config.ts b/apps/web/drizzle.config.ts index 615eea57..87547bd0 100644 --- a/apps/web/drizzle.config.ts +++ b/apps/web/drizzle.config.ts @@ -1,23 +1,20 @@ import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
+import { env } from "@/env";
// Load the right env file based on environment
-if (process.env.NODE_ENV === "production") {
+if (env.NODE_ENV === "production") {
dotenv.config({ path: ".env.production" });
} else {
dotenv.config({ path: ".env.local" });
}
-if (!process.env.DATABASE_URL) {
- throw new Error("DATABASE_URL is not set");
-}
-
export default {
schema: "../../packages/db/src/schema.ts",
dialect: "postgresql",
dbCredentials: {
- url: process.env.DATABASE_URL,
+ url: env.DATABASE_URL,
},
out: "./migrations",
- strict: process.env.NODE_ENV === "production",
+ strict: env.NODE_ENV === "production",
} satisfies Config;
|
