secret-to-env
v1.0.2
Published
[![npm version][npm-badge]][npm-url] [![Build Status][travis-badge]][travis-url] [![Coverage Status][coveralls-badge]][coveralls-url] [![Dependency Status][david-badge]][david-url]
Downloads
26
Maintainers
Readme
Secret to Env
Used to parse docker secrets into environment variables
Install
npm i secret-to-env
Usage
const {get, getSync} = require('secret-to-env')
const result = await get() // returns promise, resolves to secrets
const result = getSync() // uses sync methods, returns secrets
await config() // populates secrets into process.env
configSync() // uses sync methods, populates into process.env
API
config
populates secrets into target
options - passed as object.
target - object to mutate, defaults to
process.env
dir - directory to load, default to
/var/run/secret
encoding - file encoding, defaults to utf-8
get
returns secrets as pogo
options - passed as object.
dir - directory to load, default to
/var/run/secret
encoding - file encoding, defaults to utf-8
License
MIT