UNPKG
env-cipher
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
A module to encrypt and decrypt ENV variables
github.com/ralfbecher/env-cipher
ralfbecher/env-cipher
env-cipher
/
lib
/
decrypt.js
8 lines
(6 loc)
•
228 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
const
run =
require
(
'./index'
);
// load .env-cipher into process.env
require
(
'dotenv'
).
config
({
path
:
'.env-cipher'
})
// decrypt values from process.env with suffix
const
decrypted = run.
envDecipher
();
console
.
log
(decrypted);