.env has never worked for me

Any suggestions? Am using t3 stack I put in some keys in the .env when i try to console.log them it says undefined
6 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lopen
Lopen2y ago
Still didn't work The funny thing is DATABASE_URL in the .env i where my app reads it database and it works fine I don't know why everything else in the .env won't work
cje
cje2y ago
Create T3 App
Environment Variables 🚀 Create T3 App
The best way to start a full-stack, typesafe Next.js app.
Lopen
Lopen2y ago
Thanks Is it safe enough to put my api keys clientSchema?
cje
cje2y ago
env variables in the frontend are never safe especially not api keys if you make a request from the frontend with the api key in it, all someone has to do is open the network tab
Lopen
Lopen2y ago
So what is considered a backend in t3? Because i tried making a utils function for the call that will need the env file still didn't see it Only files in server/router are considered backend or the whole server folder? Tried to use the apikey from the .env file is still isn't getting recognized
Want results from more Discord servers?
Add your server