use different env files based on node env

This commit is contained in:
2025-08-19 01:53:27 -04:00
parent 3d815afc82
commit 6c686d0412

View File

@@ -1,7 +1,11 @@
import { defineConfig } from 'drizzle-kit';
import * as dotenv from 'dotenv';
dotenv.config({ path: '.env.local' });
if (process.env.NODE_ENV === "production") {
dotenv.config({ path: '.env.production' });
} else {
dotenv.config({ path: '.env.local' });
}
export default defineConfig({
dialect: 'postgresql',