node.js - How do I run multiple node streams in sequence? -
given 2 streams, stream1
, stream2
, how can run them in sequence, throwing if fails?
i'm looking simpler this:
stream1.on('end',function(){ stream2.on('end',done); }); stream1.on('error',function(error){done(error);}); stream2.on('error',function(error){done(error);});
thanks.
there ways that, check next link, gonna how write code in node in elegant way:
hope need.
Comments
Post a Comment