fc00-peers-client
v1.0.0
Published
connects to the hyperboria peers api
Downloads
4
Readme
Hyperboria Peers Client
A lightweight client for the peers api.
Installation
npm i fc00-peers-client
Usage
var Client = require("fc00-peers-client");
// find nodes in North America
Client.location(['na'], function (e, out) {
if (e) { return console.error(e); }
// do something with the result
console.log(out);
});
// find nodes in Germany
Client.location(['de'], function (e, out) {
if (e) { return console.error(e); }
// do something with the result
console.log(JSON.stringify(out, null, 2));
});
// find nodes by peerName
Client.peerName('transitiontech', function (e, out) {
if (e) { return console.error(e); }
console.log(JSON.stringify(out, null, 2));
});
That's all for now!