title: How to handle the response in callback functions (used by cradle in nodejs for example)
body: <p>I'm using "express" and "cradle" in "nodejs". If I request my database I have to define a callback to handle the response. Unfortunately I have no access to res (response) in my callback function. What is the best practice for this problem? Here is my code.</p>
  
  <pre><code>var cradle = require('cradle');
  var db = new cradle.Connection().database('guestbook');
  app.get('/guestbook', function(req, res) {
    db.view('guestbook/all', function(err, doc) { 
      console.log(doc);
      // How can I use res in this callback
      // to send the response?
    });
  });
  </code></pre>