@dot/env
v0.1.5
Published
Load environment variables from .env files
Downloads
6,243
Readme
@dot/env
Load environment variables from .env files.
This tiny package composes a few packages in order to load .env intelligently:
dotenvdotenv-expandfind-up
Differences with dotenv:
- Automatically expands variables such as
${NODE_ENV}within the.envfiles - Searches the immediate directory (current working directory) for an
.envfile, and if not found, continues to look in parent directories until a.envfile is found, or.gitis encountered.
Possible future features:
- [ ] Composing multiple
.envfiles - [ ] Extending
.envfiles
Requirements
This package requires an Active LTS Node version (v18+).
Install
Using pnpm:
pnpm add @dot/envUsage
Usage is straightforward:
import '@dot/env';That's it. You're good to go.
