# How to store and fetch data to pouchdb node

**URL:** <https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700>\
**Category:** General\
**Created:** [8 July 2020 07:04 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700 "2020-07-08T07:04:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhtar321h](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@akhtar321h](https://discourse.nodered.org/u/akhtar321h)\
**Post date:** [8 July 2020 07:04 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/1 "2020-07-08T07:04:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 July 2020 15:39 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/2 "2020-07-08T15:39:53Z")

</div>

What is full name of the node you are using?

---

<div class="post-metadata">

**Author:** ![akhtar321h](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@akhtar321h](https://discourse.nodered.org/u/akhtar321h)\
**Post date:** [9 July 2020 04:38 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/3 "2020-07-09T04:38:32Z")

</div>

Full name is pouchdb only.

This is the link: [https://github.com/michelcourbon/node-red-contrib-pouchdb](https://github.com/michelcourbon/node-red-contrib-pouchdb)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 July 2020 08:32 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/4 "2020-07-09T08:32:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 July 2020 21:38 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/5 "2020-07-09T21:38:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 July 2020 21:44 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/6 "2020-07-09T21:44:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 July 2020 21:46 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/7 "2020-07-09T21:46:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [9 July 2020 22:16 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/8 "2020-07-09T22:16:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 September 2020 22:16 UTC](https://discourse.nodered.org/t/how-to-store-and-fetch-data-to-pouchdb-node/29700/9 "2020-09-07T22:16:03Z")

</div>

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