我尝试使用PouchDB复制CouchDB数据库但是当我尝试以下操作时遇到问题:
var localdb = new PouchDB('namedb');
var remote = new PouchDB('https://example.com:6984/namedb');
var rep = PouchDB.replicate( remote, localdb,{
live: true,
retry: true
}).on('change', function (info) {
// handle change
}).on('paused', function (err) {
// replication paused (e.g. replication up to date, user went offline)
}).on('active', function () {
// replicate resumed (e.g. new changes replicating, user went back online)
}).on('denied', function (err) {
// a document failed to replicate (e.g. due to permissions)
}).on('complete', function (info) {
// handle complete
}).on('error', function (err) {
// handle error
});
控制台说:net::ERR_CONNECTION_CLOSED
和
Object {status: 0, name: "unknown", message: "getCheckpoint rejected with ", result: Object}
message
:
"getCheckpoint rejected with "
name
:
"unknown"
result
:
Object
status
:
0
__proto__
:
Object