I am trying to sync pouchDB with CouchBase through Sync Gateway by channel. In pouch I have :
var da = new PouchDB('example_DE');
da.sync(remoteDB, {
create_target: true,
live: true,
retry: true,
filter: "sync_gateway/bychannel",
query_params: {
channels: ["DE"]
}
})
Sync config file:
{
"log": ["*"],
"CORS": {
"Origin":["http://127.0.0.1:8887","http://localhost:8887"],
"LoginOrigin":["http://127.0.0.1:8887","http://localhost:8887"],
"Headers":["Content-Type","Authorization"],
"MaxAge": 1728000
},
"adminInterface": "127.0.0.1:4985",
"interface": "0.0.0.0:4984",
"databases": {
"db": {
"bucket":"db",
"username": "Administrator",
"password": "123456",
"server": "http://localhost:8091",
"sync":
`function (doc) {
channel(doc.channels);
}
`,
"users": {
"GUEST": {"disabled": false, "admin_channels": ["*"] }
}
}
}
I can find in browser in IndexedDB my documents but in console I get this error: GET http://localhost:4984/db/_local/nKlC5IrimnHOiQZcwE_LYA%3D%3D? 404 (Not Found)