What is the best way to alert the user if there is a loss of Internet connection or if the server goes offline, causing live sync to stop?
var localdb = new PouchDB('localdb');
var remotedb = new PouchDB('http://localhost:5984/xyz');
localdb.replicate.to(remotedb, {live: true});
localdb.replicate.from(remotedb, {live: true});