How to store and fetch data to pouchdb node

Hello Everyone,

I want to store and access the data by using pouchdb node. I am able to store data in pouch db server, but I don't know how to access data from pouchdb server through pouchdb node.
Please help me out.
And if you have any example flow please give me.

Thank you

What is full name of the node you are using?

Full name is pouchdb only.

This is the link:

Hmmm, going to that node (which has never been published AND hasn't been updated in 5 years) there is an issue from 2017 about installation problems.

I wouldn't bother with that node if I were you and this (as far as I can tell) is the first mention of pouchdb on the forum so I don't think you are going to find much help - sorry to say.

You could try emailing the author of the node or maybe create your own node to access pouchdb.

PouchDB is something that I keep meaning to do something with. I like the idea of it and it sync's up nicely with CouchDB which is a useful document-based nosql database that I've used previously since it is very JavaScript focused.

@akhtar321h, if the node isn't working for you, the alternative would be to:

  • cd ~/.node-red && npm install pouchdb
  • add a pouchdb: require('pouchdb'), to the globals section of your settings.js file
  • Add a function node
  • In the function node, add const PouchDB = global.get('pouchdb'); to the start

From there, you can use the example code from the PouchDB website.

as it essentially the same interface as couchDb there is also the node-red-contrib-couchdb node and node-red-contrib-cloudantplus node that also talks to couchdb.

1 Like

I'd forgotten about those! :sigh: never enough time to play.

yeah I did write a storage plugin that used pouch once... the self replication was quite neat.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.