使用PouchDB进行复制时出现问题

时间:2017-04-07 07:55:15

标签: javascript couchdb pouchdb

我尝试使用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

0 个答案:

没有答案