Skip to content

Latest commit

 

History

History

yup-dotenv-process-env

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Example: Yup + environment variables

Open in StackBlitz

Load and merge configuration from:

Use APP_ prefix for environment variables. Validate merged object using Yup.

Local usage

npm i     # yarn
npm start # yarn start

Actions

  • check the schema used and modify it
  • make invalid changes in .env files (e.g. set db.port to foo or -1234)
  • remove some required variable (e.g. db.user from .env)