I am using nano library to query couch. I am trying to get just the _design documents so I have the following url:
nano.get(encodeURIComponent(JSON.stringify(`_all_docs?startkey="_design/"&endkey="_design0"&include_docs=true`)));
when I try the above in post man (without encodeURIComponent and stringify) it works but the qutation seems to be an issue with nano. Any idea how I can get the above url return the list of _design docs?
db.list()
function.nano.request
In your case, you should do something like this:
const db = nano.use(databaseName);
db.list({include_docs:true, startkey:"_design/", endkey:"_design0"});