CouchDB and Node.js - What module do you recommend? [closed]
What modules are you using to connect to your CouchDB server, in your Node.js applications? And why would you recommend whatever module you are using?
When getting started, do not use CouchDB libraries in NodeJS!
There several, however they are largely thin layers wrapping the HTTP API. But Node has very strong HTTP support. It's no more trouble to make simple HTTP queries. It's simpler. It's less prone to errors. When CouchDB adds a feature, you won't need to wait for library support. You will learn and understand CouchDB better. It's well worth avoiding a library at first.
I use the built-in querystring
module, and also Mikeal Rogers's request library, which is a super thin HTTP convenience library.
Try to look at nano which offers simple and minimalistic API for CouchDB or high-level client cradle.
I am the author of nano. When starting with CouchDB I did exactly as Jason Smith advised using Mikeals request library. Nano was born out of using that code in production and realizing I had some coded that could be improved and abstracted.
The end result is minimalistic and you still have a way to go down to the request level and do a request (which many users do).
Nano was really well accepted by the CouchBase team, mostly cause it's soo\ simple and maps well to the API.
If you are interested in checking out more check out this blog post: http://writings.nunojob.com/2011/08/nano-minimalistic-couchdb-client-for-nodejs.html
I've written a very clean and simple HTTP API wrapper, called node-couchdb-api
. It doesn't add any bloat features like an ORM, and it follows typical Node.js conventions for callbacks and async code.