News for hackers. Stuff that matters.
Re:Who is Using Node.js And Why? Yammer, Bocoup, Proxlet and... by isntitvacant on Saturday January 15, 2011 @08:54PM (#2108374)
something like this:

  var session = require('session'),
      models = require('models'),
      template = require('template');

  function main(request,response){
    session.start(
      models.getEntries.bind(models,
        template.render.bind(template, 'blog',
          response.write.bind(response))));
  }
would be easy to put together with node.js; it's functionally equivalent to the above (though it assumes that data comes into the template.render call as the last argument(s)), and neatly avoids too much nesting.

There are no comments on this comment yet.