https://github.com/chronark/env
https://github.com/chronark/env
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chronark/env
- Owner: chronark
- License: mit
- Created: 2021-12-10T10:42:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T11:26:36.000Z (over 4 years ago)
- Last Synced: 2025-08-11T01:42:25.936Z (12 months ago)
- Language: TypeScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# env
Utility library to load and require environment variables to be set
## Quickstart
```typescript
import { env } from "@chronark/env"
// this will throw an error if `HOST` is not a defined environment variable
const host = env.require("HOST")
// this will instead use the provided default value
const port = env.get("PORT", 3000)
```