Please check request for more information on the defaults. They support features like cookie jar, proxies, ssl, etc.

pool size and open sockets

a very important configuration parameter if you have a high traffic website and are using nano is setting up the pool.size. by default, the node.js http global agent (client) has a certain size of active connections that can run simultaneously, while others are kept in a queue. pooling can be disabled by setting the agent property in request_defaults to false, or adjust the global pool size using:

http.globalAgent.maxSockets =20;

you can also increase the size in your calling context using request_defaults if this is problematic. refer to the request documentation and examples for further clarification.

here's an example explicitly using the keep alive agent (installed using npm install agentkeepalive), especially useful to limit your open sockets when doing high-volume access to couchdb on localhost:

nano.relax(opts, [callback])

nano.dinosaur(opts, [callback])

nano.config

an object containing the nano configurations, possible keys are:

url - the couchdb url

db - the database name

document functions

db.insert(doc, [params], [callback])

inserts doc in the database with optional params. if params is a string, its assumed as the intended document name. if params is an object, its passed as query string parameters and doc_name is checked for defining the document name.

pipes

you can pipe in nano like in any other stream.
for example if our rabbit document has an attachment with name picture.png
(with a picture of our white rabbit, of course!) you can pipe it to a writable
stream

license

licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at

http://www.apache.org/licenses/LICENSE-2.0.html

unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.