Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 318
cllpse Avatar asked Apr 03 '11 20:04

cllpse


People also ask

For which node JS is not recommended?

js receives a CPU bound task: Whenever a heavy request comes to the event loop, Node. js would set all the CPU available to process it first, and then answer other requests queued. That results in slow processing and overall delay in the event loop, which is why Node. js is not recommended for heavy computation.


2 Answers

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.

like image 83
JasonSmith Avatar answered Sep 24 '22 01:09

JasonSmith


Try to look at nano which offers simple and minimalistic API for CouchDB or high-level client cradle.

like image 24
yojimbo87 Avatar answered Sep 25 '22 01:09

yojimbo87