Can somebody explain to me why we need an env folder with .mjs files in the T3 starter project?

Wondering why we can't use a standard .env file or .env.local or what the advantages are of doing it the ways it's done in the t3 starter?
5 Replies
stoyko
stoykoβ€’3y ago
Typesafety. These files are used to validate the fields in the .env and also to ensure that they are used correctly later on in the project. And the different extensions are for the FE and BE
plyglt
plygltOPβ€’3y ago
thanks a lot! so it's not like you couldn't do it with .env files, it's just neater because of type safety! thanks πŸ™‚
stoyko
stoykoβ€’3y ago
Yeah. It’s an added layer of safety.
nexxel
nexxelβ€’3y ago
Create T3 App
Environment Variables πŸš€ Create T3 App
Create T3 App is the quickest way to start a new web app with fullstack typesafety
nexxel
nexxelβ€’3y ago
these docs are still wip
Want results from more Discord servers?
Add your server