mesh-webrtc-bus

1.0.4 • Public • Published
var mesh     = require("mesh");
var localStore  = require("mesh-local-storage");
var webrtc      = require("mesh-webrtc");

// get key here: http://peerjs.com/
var webRtcDb = webrtc({ key: "peer-id" });
var db = mesh.parallel(localStore(), webRtcDb);

webRtcDb.peer.connect("peerId");

mesh.run(db, "tail").on("data", function(action) {

});

mesh.stream(db).write(mesh.action("insert", {data: "blarg" }));

Readme

Keywords

none

Package Sidebar

Install

npm i mesh-webrtc-bus

Weekly Downloads

5

Version

1.0.4

License

ISC

Last publish

Collaborators

  • crcn