title: Connect to couchDB through Restify
body: <p>I have been trying to connect to couchDB to get some data back or do anything with it. I have not been able to connect to couchDB!</p>
  
  <p>Please can anyone tell what am I doing wrong. <strong>Please!!!</strong></p>
  
  <p>When run this program it console logs <strong>"incoming requests"</strong> &amp; <strong>"Got it"</strong> but nothing else.</p>
  
  <p>Please just tell me how to connect to couchDB.      </p>
  
  <pre><code>   var restify = require("restify");
     var server = restify.createServer();
  
     server.listen(8080, function(){
     console.log("incoming requests");
     });
  
     server.get('/users', function(req, res){
  
     var request = require('request');
     request('http://domain.iriscouch.com/testbook/_all_docs', function (error, response, body) {
  
     if (!error &amp;&amp; response.statusCode == 200) {
     console.log(body);
     }
  
     });
  
       console.log("Got it!"); 
       res.end();
    });
  </code></pre>