ghks
Basic key/value store for Node, using GitHub gists for persistent storage.
Basic Usage
const ghks = ; // Create new cache.let cache = name: 'ghdb_example' token: '{YOUR_GITHUB_TOKEN}' ; cache;
.set(key, value)
Sets the value of a key in the cache.
cache;
.get(key)
Gets the value of a key in the cache.
cache;
.pull()
Pulls the remote cache from the gist - overwrites local cache.
cache;
.push()
Pushes the local cache to the remote gist - overwrites the remote.
cache;
Auto-push
ghks will automatically push the local cache to the Gist on certain events.
- process SIGINT
- process SIGTERM