Using Asynquence
Video Course on Real-Time HTML5 with Node.jsMore code cleanup with asynquence
using the module:
hello.say(args.file).then(function(done,contents){
});
the shortcut for this pattern with the .val
method
hello.say(args.file).val(function(contents){
console.log(contents.toString());
})
// handling the error:
.or(function(err){
console.error("error: ", err);
})
// the error will bubble up from anywhere the sequence
> to create a maintanable abstratction for your asynchronous flow control