Integrating couchDB with a Node.js server without using any 3rd party libraries to understand how it works