Trying to convert nano.feedUpdated to nano.db.use().changesReader ...
let feed = nano.db.use('_db_updates').changesReader.get({ since: lastStopped, include_docs: true });
// same with .start
feed.on('error', (err) => {
console.error('changes feed error:\n', err);
})
Error: Only GET allowed
at responseHandler (.../node_modules/nano/lib/nano.js:203:20)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
{
scope: 'couch',
statusCode: 405,
request: {
url: 'http://localhost:5984/_db_updates/_changes?feed=longpoll&timeout=60000&since=....&limit=100&include_docs=false',
method: 'post',
headers: {
accept: 'application/json',
'user-agent': 'nano/11.0.4 (Node.js v25.8.2)',
'Accept-Encoding': 'deflate, gzip',
Authorization: 'XXXXXXX',
'content-type': 'application/json'
},
credentials: 'include',
body: '{}',
redirect: 'error',
signal: AbortSignal { aborted: false },
bodyTimeout: 0
},
headers: {
uri: 'http://localhost:5984/_db_updates/_changes?feed=longpoll&timeout=60000&since=....&limit=100&include_docs=false',
statusCode: 405
},
errid: 'non_200',
description: 'Only GET allowed',
error: 'method_not_allowed',
reason: 'Only GET allowed'
}
Trying to convert nano.feedUpdated to nano.db.use().changesReader ...
changes feed error: