Using Asynquence

In notebook:
FrontEndMasters Real-Time Web with Node.js
Created at:
2015-10-13
Updated:
2015-10-14
Tags:
JavaScript libraries
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