T
TanStack5mo ago
other-emerald

Type-safe environment variables?

Hey folks, has anyone had experience with setting up something like T3 Env (https://env.t3.gg/docs/introduction) for validating env vars at the start of the server and thereafter accessing them from an object where they're guaranteed to exist? The part puzzling me is differentiating between server and client – i.e. some variables will only be available in server context on purpose (because they're secrets).
Env
Never build your apps with invalid environment variables again. Validate and transform your environment with the full power of Zod.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?