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.
npm install hyperdb-mesh
var mesh =var db = mesh1dbmesh
Peer B running in a different computer or folder.
var key = 'bec87d64bfdc33b6b02779666e46a3f01f0aa07f721c2177a44d64c4a6b50afd'var mesh =var db = mesh1dbmesh
hyperdb-mesh events & methods
The underlying HyperDB instance is accessible from .db
Pass in HyperDB options like so:
var mesh =
- Run tests on travis
- Test on Windows
- More testing
- Global password or extra auth strategies for peers