1.0.4 • Published 9 years ago

mesh-webrtc-bus v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago
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" }));
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago