Source Code

https://hook.io/examples/javascript-stream-merge

These examples can be run directly in the browser or from any client which speaks HTTP.
You can also send data using tools like cURL.

Code

module['exports'] = function mergeStreams (hook) {
  var ms = require('merge-stream');
  var request = require('request');
  var stream1 = request('https://hook.io/examples/bash-hello-world');
  var stream2 = request('https://hook.io/examples/ruby-hello-world');
  var merged = ms(stream1, stream2);
  // You can also add new streams later
  // merged.add(stream3);
  merged.on('data', function(chunk){
    hook.res.write(chunk.toString());
  });
  merged.on('end', function(){
   hook.res.end();
  });
};

To make your own copy of this service or "Fork" it simply click the button. You will need to register for a Free Account, but it's very quick and easy!