strict-env-validator
I kept breaking apps because of missing env variables… so I built this. Hey everyone 👋 I’ve lost count of how many times this happened: App crashes in production Turns out → missing or invalid .en...

Source: DEV Community
I kept breaking apps because of missing env variables… so I built this. Hey everyone 👋 I’ve lost count of how many times this happened: App crashes in production Turns out → missing or invalid .env variable Or worse… typo like DATABSE_URL 😅 So I built a small utility to fix this problem: 👉 strict-env-validator 🔗 https://www.npmjs.com/package/strict-env-validator 🔧 What it does Automatically loads .env files Validates all environment variables at startup Throws clear errors if something is missing or invalid Prevents your app from running with bad config ✨ Why I built it I tried existing tools, but I wanted something: Simpler to use Strict by default Works out of the box without too much setup Most tools validate env variables, but I wanted something that fails fast and clearly before your app even starts. ⚡ Example Instead of writing validation manually: const PORT = process.env.PORT; if (!PORT) throw new Error("Missing PORT"); You get: import "strict-env-validator"; And it handle