Skip to content

Type-safe environment variables in Bun and Node. Validate numbers, URLs and strings! no more `undefined`

Notifications You must be signed in to change notification settings

huseeiin/omgeving

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omgeving

Type-safe environment variables in Bun and Node

Install

pnpm/npm/bun i omgeving
# or
yarn add omgeving

Example

const { PORT } = cleanEnv({ PORT: port({ devDefault: 3000 }) });

If you are using Node, you need to pass a --env-file argument to where your .env file is:

node --env-file=.env app.js

About

Type-safe environment variables in Bun and Node. Validate numbers, URLs and strings! no more `undefined`

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages