Streaming replicator for dat-graph
npm install dat-stream-replicator
var replicator =var dat = datGraphInstancevar otherDat = anotherDatGraphInstancevar stream =var otherStream =stream
Create a new replication stream for a dat-graph instance. Options include:
// gzip the nodes being sent. both sides have to say `true` for gzip to be enabled// defaults to truegzip: true// only pull/push or do a two way sync. defaults to syncmode: 'sync'
The stream will emit progress events when pushing / pulling. The events look like this
You can always access the latest pushed/pulled event as