change direction = push in both client

16 weergaven
Naar het eerste ongelezen bericht

Jeremy Vuillermet

ongelezen,
13 nov 2015, 04:42:4013-11-2015
aan PouchDB
Hello,

My setup is the following. One local db live synced with a remote one.

db.sync(remote, {
      live: true,
      retry: true
    }).on('change', (data) => {
      console.log('change', data)
 }

I open 2 tabs of my app. When I create a new doc. both the client receive a change update with a 'push' direction.

Is this normal ?

I would like to know when there is a change from the remote so I can notify the rest of my app and send the new docs.

Jeremy Vuillermet

ongelezen,
13 nov 2015, 04:48:5013-11-2015
aan PouchDB
Also, my documents can't be updated so I guess I don't need to deal with rev, not sure though

Jeremy Vuillermet

ongelezen,
13 nov 2015, 05:08:1713-11-2015
aan PouchDB
Ok I feel idiot but if I use the same host on the same computer, obviously the local db will sync together thus the 'push'. My bad


On Friday, November 13, 2015 at 10:42:40 AM UTC+1, Jeremy Vuillermet wrote:
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten