hyperdb-sneakernet

3.0.0 • Public • Published

hyperdb-sneakernet

Peer to peer field replication for a hyperdb you can send around on a USB stick.

hyperdb-sneakernet stores a live hyperdb copy on a USB stick suitable for replicating with existing hyperdbs and also for authorizing new writers.

Status

wip mad science; don't use for anything meaningful yet.

Example

var replicate = require('hyperdb-sneakernet')
var hyperdb = require('hyperdb')

var db = hyperdb('log.db', { valueEncoding: 'json' })

replicate(db, '/media/usb/log.db')

API

var replicate = require('hyperdb-sneakernet')

replicate(db, dir[, opts={}], cb)

Performs replication between the hyperdb db and the directory located at dir. If no diectory exists at dir then a brand new hyperdb database will be created there and replicated to.

cb is a callback function of the form function (err) {}, and is called upon an error, or successful completion.

Install

With npm installed, run

$ npm install hyperdb-sneakernet

License

ISC

Package Sidebar

Install

npm i hyperdb-sneakernet

Weekly Downloads

1

Version

3.0.0

License

ISC

Unpacked Size

10.7 kB

Total Files

6

Last publish

Collaborators

  • noffle