javascriptexpresscouchdbnode-modulescouchdb-nano

couchdb, use middleware or not? Which for simple restful API, with express4 nodejs


I don't find a lot of examples about couchdb with nodejs and express4.

I've seen there are on npm:

they are compatible with couchdb 2?

or there is a way to work without middleware? in this case it's better to work without middleware to understand better how works couchdb? I'd like to read some examples about that.


Solution

  • Well, the documentation of PouchDB is absolutely awesome. You have a bigger community(in my opinion) around PouchDB and it's constantly evolving. If it's not fully compatible with CouchDB 2.0, it will be very soon. They are also already implementing the Mango Query.

    Nano is very minimalist compared to PouchDB.Everything depends on your needs. Also, PouchDB offers you the possibility to use Promises which make it easier to write clean code compared to nano callbacks.

    Nano and PouchDB are good libraries and I highly suggest that you start using one of those libraries. Unless you want to build something very different from those, building your own library would be a waste of time. You might want to focus more on the core of your project than building an library to access CouchDB's API.