3.4.1 • Published 3 months ago
envk v3.4.1
envk
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 envk
node -r envk index.js
Features:
- auto-detect of
.env.<NODE_ENV>
or.env
file - support for custom
.env
filename withENVK
environment variable - support for variable expansion
- 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 envk index.js
Load envs from .env.production
file, otherwise .env
:
NODE_ENV=production node -r envk index.js
Load envs from specific file:
ENVK=file.env node -r envk index.js
Log to console imported variables:
ENVK_DEBUG=1 node -r envk index.js
3.4.1
3 months ago
3.4.0
11 months ago
3.3.0
11 months ago
3.2.3
11 months ago
3.2.2
2 years ago
3.2.1
2 years ago
3.2.0
3 years ago
3.1.0
3 years ago
3.0.6
3 years ago
3.0.5
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.1
4 years ago
2.0.0
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago