hyperdb-examples
hyperdb-examples copied to clipboard
a small introduction to getting started with hyperdb
hyperdb-examples
a small example on how to get up and running with 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 <key>
where <key>
is the key that was printed above
if you want to disable auto-authorization, add the --noautoauth
flag to the above
Commands
there's a small cli (see 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 <key>
print out the information stored at key
.get hello
.put <key>=<value>
store value
under key
in the database
.put hello=world
.registered <key>
check if key
is authorized to write to the database
.auth <key>
authorize key
to write to the database
References
- mafintosh/hyperdb dat's distributed scalable database, see the full api
- jimpick/dat-shopping-list an interactive web demo using hyperdb by way of hyperdrive#hyperdb-backend
- substack/chatmesh a cli chat client built on hyperdb