Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cblgh/hyperdb-examples

a small introduction to getting started with hyperdb
https://github.com/cblgh/hyperdb-examples

dat hyperdb p2p

Last synced: 4 days ago
JSON representation

a small introduction to getting started with hyperdb

Awesome Lists containing this project

README

        

# hyperdb-examples
a small example on how to get up and running with [hyperdb](https://github.com/mafintosh/hyperdb)

#### `npm install && node index.js --db db1`
then in another terminal window, using the key that is printed under `db key is`, write
#### `node index.js --db db2 --key `
where `` is the key that was printed above

if you want to disable [auto-authorization](https://github.com/cblgh/hyperdb-examples/blob/master/index.js#L50-L69), add the `--noautoauth` flag to the above

## Commands
there's a small cli (see [input.js](https://github.com/cblgh/hyperdb-examples/blob/master/input.js)) for interacting with the hyperdb. use it as follows

#### `.db`
    print out the db key
#### `.local`
    print out the local feed's key
#### `.get `
    print out the information stored at `key`
    `.get hello`
#### `.put =`
    store `value` under `key` in the database
    `.put hello=world`
#### `.registered `
    check if `key` is authorized to write to the database
#### `.auth `
    authorize `key` to write to the database

## References
* [mafintosh/hyperdb](https://github.com/mafintosh/hyperdb) dat's distributed scalable database, see the full api
* [jimpick/dat-shopping-list](https://github.com/jimpick/dat-shopping-list) an interactive web demo using hyperdb by way of [hyperdrive#hyperdb-backend](https://github.com/mafintosh/hyperdrive/tree/hyperdb-backend)
* [substack/chatmesh](https://github.com/substack/chatmesh/) a cli chat client built on hyperdb