KVdb.io JavaScript API client
API client for KVdb.io, a managed key-value storage service that lets you quickly build applications in the key-value domain without worrying about backend infrastructure.
Features
- Minimal
- Async-ready and Promises-friendly
- Only a single dependency when used from node.js (node-fetch)
- Uses the Fetch API, making it compatible for use with both node.js and the browser
Example Usage
Client-Side
Drop this line into your HTML source:
Server-Side
Install npm module:
npm i kvdb.io
Use it:
const KVdb =
Use the API
const bucket = KVdb // access token arg optional const myapp = async { // set a key await bucket // get a key let res = await bucket console // increment a key await bucket // list key by prefix (returns an array of keys) res = await bucket console // list key-values by prefix (returns an array of [key, value] tuples) res = await bucket for const key value of res console // delete a key await bucket}
LocalForage Driver
If you're interested in using the KVdb localForage driver, it's easy:
License
MIT