Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tngan/vaultenv
Loads environment variables from Hashicorp's vault
https://github.com/tngan/vaultenv
Last synced: 18 days ago
JSON representation
Loads environment variables from Hashicorp's vault
- Host: GitHub
- URL: https://github.com/tngan/vaultenv
- Owner: tngan
- License: mit
- Created: 2018-02-24T15:50:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T03:42:19.000Z (over 6 years ago)
- Last Synced: 2024-10-12T17:05:06.634Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vaultenv
Loads environment variables from Hashicorp's vault for Node.js application## Reasons
- **Single source of truth**: .env consists of sensitive information, we share that file among others under development phase, we have to notice everyone even we change one of the variables.
- **Reduce duplication**: Different microservices could share same environment variables, those can be refactored into same secret engine without multiple declarations, otherwise you have to update every repositories once it gets changed.
## Install
Under development
## Usage
```js
require('vaultenv').config({
apiUrl: 'http://localhost:8080/api/v1', // vault http api endpoint
token: 'xxx', // vault token
engines: ['/secret/app'] // single or multiple secret engines
});
```Then you can access the declared environment variables via
```js
process.env.ENV_VARS_NAME
```### License
[MIT](LICENSE)
### Copyright
Copyright (C) 2018 Tony Ngan, released under the MIT License.