use different env files based on node env
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user