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
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
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 π
Yeah. Itβs an added layer of safety.
check this out @dominik.sfl https://create-t3-app-nu.vercel.app/en/usage/env-variables
Create T3 App
Environment Variables π Create T3 App
Create T3 App is the quickest way to start a new web app with fullstack typesafety
these docs are still wip