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:

node.js flow

hope need.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -