hashnet-broker-simple-peer

0.1.1 • Public • Published

hashnet-broker-simple-peer

Hashnet broker, setting up simple-peer connections

Usage

const Peer   = require('hashnet');
const broker = require('hashnet-broker-simple-peer');

// Create new hashnet peer
const peer = new Peer();

// Attach this broker
broker.apply(peer);

// Connect to known server
peer.addConnection('wrtc://server/bootstrap');

API

broker.apply(peer)

Integrates the broker into the given peer

broker.middleware(peer)

express middleware, attaches a listener on your server to bootstrap clients with

broker.server(peer)

returns non-listening stand-alone http server to bootstrap clients with (/bootstrap)

Readme

Keywords

Package Sidebar

Install

npm i hashnet-broker-simple-peer

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

12.3 kB

Total Files

11

Last publish

Collaborators

  • finwo