Narcissistic Preening Monarch
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

mesh-webrtc

0.0.8 • 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(operation) {
  
});
 
mesh.stream(db).write(mesh.operation("insert", {data: "blarg" }));

Keywords

install

npm i mesh-webrtc

Downloadsweekly downloads

6

version

0.0.8

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar