title: Calling redis method synchronously
body: <p>I am learning developing in nodejs and redis db. I am on express framework.</p>
  
  <p>Problem: Let's say in redis I have some user info in hashes with key user:id, than I have last logged in key user_lastlogged:user_id and than I have his favourite items in user_favourites:user_id.</p>
  
  <p>I want to render page with user details, last login time and his fav. items in node js.</p>
  
  <p>I would use something like this, but of course it wont work, because the method callbacks are run asynchronously.</p>
  
  <pre><code>var redis = require("redis");
  var client = redis.createClient();
  
  router.get('/', function (req, res, next) {
  
    var userId='1';
  
    var returnHtml = '';
  
    client.hgetall('user:'+userId, function(err,objects){
      returnHtml+=utils.inspect(objects);
    });
  
    client.hgetall('user_lastlogged:'+userId, function(err,objects){
      returnHtml+=utils.inspect(objects);
    });
  
    client.hgetall('user_favourites:'+userId, function(err,objects){
      returnHtml+=utils.inspect(objects);
    });
  
    res.send(returnHtml);
  
  });
  </code></pre>
  
  <p>Ignore the use of appropriate redis data types etc for now please.</p>
  
  <p>How is this kind of task generally solved in node.js? Or maybe in express js framework (if it helps)?</p>
  
  <p>Thanks!</p>