Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envguard

The fastest way to make broken environment variables fail before your app does. Package: @krazybean/envguard

npm version npm downloads license typescript

envguard demo

Install

npm install @krazybean/envguard

Why This Exists

Most apps trust process.env until something explodes in production. A missing DATABASE_URL or invalid PORT often fails late, far from startup. That means confusing runtime crashes, noisy logs, and slow debugging. You should know your environment is valid the moment your app boots.

The Fix

const env = loadEnv({
  PORT: "number",
  DATABASE_URL: "string",
})

Copy-paste this

// add this to your app entrypoint
import { loadEnv } from "@krazybean/envguard"

const env = loadEnv({
  PORT: "number",
  DATABASE_URL: "string",
})

About

Runtime environment variable validation with zero magic. Fail fast, ship safe.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages