use different env files based on node env

This commit is contained in:
2025-08-19 01:53:27 -04:00
parent 92535f7e54
commit 1a13013b45

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',
@@ -12,4 +16,4 @@ export default defineConfig({
},
verbose: true,
strict: true,
});
});