如何使用节点js串行pipe理函数调用

我已经使用了一步即使然后function被称为并行,执行应该在系列,请告诉我,我要去哪里错了。

//sample code var step=require('step') step( function first() { process();//calling function here return this; returning this to next function }, function second() { process2();//calling another fun here return this; }, function third() { process3();//calling function here return this; returning this to next function } );//step end here 

请帮帮我。 谢谢

 var sync =require('async'); sync.series([ function(callback){ console.log("calling one"); callback(null, 'one'); }, function(callback){ console.log('two'); callback(null, 'two'); }, ]); 

你好,

你必须同步这些function。 这里的步骤不适用于recursion函数。

试试这个,你会得到答案。

请通过链接:

video: http : //nodetuts.com/02-callback-pattern.html

文字: http : //nodetuts.com/02-callback-pattern.html#-1

这可能会帮助你..