@patrtorg/nisi-perferendis v4.12.109
@patrtorg/nisi-perferendis
This packages lets you autoload your environment variables from your .env file, no code changes required.
Similar to dotenv, but with zero-dependencies and less verbose.
Easy as:
yarn add @patrtorg/nisi-perferendis
node -r @patrtorg/nisi-perferendis index.js # autoloads .env fileFeatures:
- auto-detect of
.env.<NODE_ENV>or.envfile - support for custom
.envfilename withENVKenvironment variable - support for variable expansiong
- support for single quotes
- support for double quotes
- support for empty lines
- support for multiline quoting with double quotes
"SECRET=hello\nworld" - support for comments prefixing the line with
#
You can see what's happening inspecting index.js.
Nothing more, nothing less.
Usage
Load envs from .env:
node -r @patrtorg/nisi-perferendis index.jsLoad envs from .env.production file, otherwise .env:
NODE_ENV=production node -r @patrtorg/nisi-perferendis index.jsLoad envs from specific file:
ENVK=file.env node -r @patrtorg/nisi-perferendis index.jsLog to console imported variables:
ENVK_DEBUG=1 node -r @patrtorg/nisi-perferendis index.js1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago