Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/changjoo-park/github-kv
GitHub as a Key-Value Store
https://github.com/changjoo-park/github-kv
key-value-database key-value-store
Last synced: about 1 month ago
JSON representation
GitHub as a Key-Value Store
- Host: GitHub
- URL: https://github.com/changjoo-park/github-kv
- Owner: ChangJoo-Park
- License: mit
- Created: 2019-08-07T11:10:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T11:18:40.000Z (over 2 years ago)
- Last Synced: 2024-10-08T14:55:11.758Z (about 1 month ago)
- Topics: key-value-database, key-value-store
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Key-Value Store
[![npm version](https://badge.fury.io/js/github-kv.svg)](https://badge.fury.io/js/github-kv)
GitHub as a Key Value store.
[한국어 안내](https://medium.com/@changjoopark/github-%EC%A0%80%EC%9E%A5%EC%86%8C%EB%A5%BC-%ED%99%9C%EC%9A%A9%ED%95%9C-%EC%84%A4%EC%A0%95%EA%B4%80%EB%A6%AC-32c8228f4c33)
## Installation
```bash
npm install -g github-kv
```## Caveat
When [create new Personal Access Token](https://github.com/settings/tokens/new), You should check only repo.
## Usage
### Example key-value store
please show store.json in this repo.
```json
{
"ACCESS_KEY": "HELLO",
"SECRET_KEY": "WORLD"
}
```### Global CommandLine Interface
in Terminal. extract is optional
```bash
# gh-kv --token \
# --owner \
# --repo \
# --file \
# --extract \
# --webhook
gh-kv --token --owner changjoo-park --repo kv --file store.json --extract key.json
```### Module in Node.js
extract is optional same as global CLI
```js
const getGitHubStore = require('github-kv')// Promise
getGitHubStore({ token, owner, repo, file, extract })
.then(store => {})
.catch(error => {})// async - await
const store = await getGitHubStore({ token, owner, repo, file, extract })
```