Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cblgh/hyperdb-examples
- Owner: cblgh
- Created: 2018-05-01T11:41:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-28T19:15:51.000Z (over 6 years ago)
- Last Synced: 2024-12-26T15:11:43.396Z (16 days ago)
- Topics: dat, hyperdb, p2p
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 53
- Watchers: 7
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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 aboveif 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