Sturlen
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Sturlen on 5/16/2024 in #questions
Vercel Data Cache Debugging
2 replies
TTCTheo's Typesafe Cult
•Created by Sturlen on 2/5/2024 in #questions
How do you safely store your API keys?
I currently store a lot of different API keys and secrets across various .env files (which are not checked in to git) on my local machine. If I need to reuse a key usually look into other project files and copy it from there. Is this considered good practice or should I be using something like a password manager for them?
7 replies
TTCTheo's Typesafe Cult
•Created by Sturlen on 7/17/2023 in #questions
Should you validate the output of DB query?
I know user input should always be validated before being stored in a DB, but what about query results? should they also be validated with zod or in a tRPC output function?
interested to know if anyone has any thoughts on this.
5 replies
DTDrizzle Team
•Created by Sturlen on 6/12/2023 in #help
Drizzle-kit can't load env file via t3-env
I'd like to use t3-env to validate my env variables in my Drizzle config file. I've tried importing t3-env in the config.ts file, but I'm hit with the error
SyntaxError: Cannot use import statement outside a module
in env.mjs
, which I find odd since it is explicitly marked as an ES module. Other than this, t3-env works fine with drizzle-orm.
Full Error:
This is my Drizzle config file:
I am I doing something wrong or is this just something drizzle-kit does not support atm?17 replies
TTCTheo's Typesafe Cult
•Created by Sturlen on 6/11/2023 in #questions
Is it possible to use t3env from a Drizzle config file?
I'm using create-t3-app but I'd like to use Drizzle instead of Prisma. I've managed to get it working, but the one pain point I have is that I can't get t3env to validate variables in my Drizzle config file. I've tried importing it normally but I'm hit with the error
SyntaxError: Cannot use import statement outside a module
in env.mjs
, which I find odd since it is explicitly marked as an ES module and runs fine when building the page.
Full Error:
This is my Drizzle config file:
Let me know if this is right place to post this or if a gh issue would be more appropriate4 replies