server dir with nextjs and drizzle

So Im configuring a drizzle and nextjs app router application In the server directory, my env keys dont work unless i add:
import {config} from 'dotenv';

config ({
path: '.env',
});
import {config} from 'dotenv';

config ({
path: '.env',
});
is there a reason for this? i thought I jsut need to do process.env.VALUE (works in api routes)
1 Reply
Elite
Elite8mo ago
ok just confused how to make my envs work with drizzle and neon as my provider what do i need to do in ym env.js for the databseurl
Want results from more Discord servers?
Add your server