https://github.com/gkovacs/getsecret
simple api to store secrets in yaml files and environment variables
https://github.com/gkovacs/getsecret
getsecret livescript store-secrets yaml yaml-files
Last synced: 8 months ago
JSON representation
simple api to store secrets in yaml files and environment variables
- Host: GitHub
- URL: https://github.com/gkovacs/getsecret
- Owner: gkovacs
- Created: 2015-03-13T03:15:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-30T22:12:29.000Z (over 8 years ago)
- Last Synced: 2025-01-30T22:46:44.443Z (8 months ago)
- Topics: getsecret, livescript, store-secrets, yaml, yaml-files
- Language: LiveScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# getsecret
A simple way to get credentials stored in yaml files and environment variables
## Install
npm install getsecret
## Storing secrets
You can store secrets in 3 locations (in decreasing order of priority)
* An environment variable. These are commonly used in Heroku. ex: `process.env.some_keyname`
* A file named `.getsecret.yaml` in your current directory
* A file named `.getsecret.yaml` in your home directory. The format should map key names to secrets, ie:
some_keyname: some_secret_value
another_keyname: another_secret_value## Accessing secrets from code
Simply pass the key name to getsecret and its value will be returned. ex:
```javascript
var getsecret = require('getsecret')
var secret_value = getsecret('some_keyname')
```## Author
[Geza Kovacs](http://github.com/gkovacs)
## License
MIT