hyperdb-mesh
Automatically authorise HyperDB peers to create a mesh, this code was extracted from the fantasic Cabal cabal-core on Github.
HyperDB allows peers to be authorised to replicate and using discovery-channel, peers are automatically authorised to form the mesh network.
As such you need to keep your discovery channel secret or run this in a controlled environment. I am trying to figure out a way to provide some authorisation process to run in untrusted places but I need to think about that.
Install
npm install hyperdb-mesh
Usage
Peer A
var mesh = var db = mesh1db mesh
Peer B
Peer B running in a different computer or folder.
var key = 'bec87d64bfdc33b6b02779666e46a3f01f0aa07f721c2177a44d64c4a6b50afd' var mesh = var db = mesh1db mesh
hyperdb-mesh events & methods
ready event
mesh
HyperDB
The underlying HyperDB instance is accessible from .db
console
Pass in HyperDB options like so:
var mesh =
Todo
- Run tests on travis
- Test on Windows
- More testing
- Global password or extra auth strategies for peers