3 ms·
1: replicates from mydb1 into the pouchdb object represented by 'db' 2 & 3: I'm pretty sure chaining replications doesn't work in that way, although thats a
by azr89 10y ago
1:
replicates from mydb1 into the pouchdb object represented by 'db'
2 & 3:
I'm pretty sure chaining replications doesn't work in that way, although thats a pretty interesting thought.
If you have to chain replications and achieve the structure in 2, you'd have to define the pouch objects as:
db = new PouchDB('localDB');
mydb1 = new PouchDB('http://example.com/mydb1'); http://example.com/mydb1');
etc ..
and then do:
mydb2.replicate.to('mydb3',{live:true});
mydb2.replicate.to('mydb1',{live:true});
mydb1.replicate.to('db',{live:true});
the 'live' flag, as you'd imagine, makes the replication live/continuous, as opposed to one-time.