Skip to content

fc00/peers-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

a lightweight client for the peers-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published