I am using PouchDB 5.6.0 to sync to a local CouchDb on my Server.
It worked before, but now it doesnt work anymore to replicate the databases.
The code in my bundle.js is as follows:
const db = new PouchDB("actions");
const remoteDatabase = new PouchDB(url);
$("#syncAgain").attr("disabled", "disabled");
console.log("disable");
yield db.sync(remoteDatabase, {
timeout: 2000
}).on('change', function (info) {
console.log("change");
}).on('paused', function (err) {
console.log("pause \n: " + JSON.stringify(err));
}).on('active', function () {
console.log("active");
}).on('denied', function (err) {
console.log("denied");
}).on('complete', function (info) {
console.log("complete");
}).on('error', function (err) {
console.log("error \n: " + JSON.stringify(err));
});
and the result in the browser is:
active
pause
: undefined
complete
I can ping the remoteDatabase and the database exists, so the remoteDatabase is not wrong