Development
Environment Variables
T3 Env is a library that provides environmental variables checking at build time, type validation and transforming. It ensures that your application is using the correct environment variables and their values are of the expected type. You’ll never again struggle with runtime errors caused by incorrect environment variable usage.
Files related to this page
env.mjs
Config file is located at env.mjs
. Simply set your client and server variables and import env
from any file in your project.
If the required environment variables are not set, you'll get an error message: