0.0.6 • Published 11 months ago
env-typesafe v0.0.6
env-typesafe
Type safe package for managing environment variables.
Instalation
npm install env-typesafe
Usage
import {loadEnv} from "env-typesafe";
import {CustomEnv} from "./env.ts"
const env: CustomEnv = loadEnv(merge)
console.log(env.SECRET_KEY)
- merge - if true, it will merge process.env with .env file
Important
- To see actual types, you will need run your code once. After that your types will be generated. You can use it in your code. Even without generating types, this package will work.
- File will be generated in the root folder as the env.ts
Authors
🔗 Links
Badges
Add badges from somewhere like: shields.io