title: How do I send files to a remote computer?
body: <p>I need to send big files from a node server to a client and need to send this data to a remote computer. I have written this code, what should I do so that data can be streamed to the other computer?</p>
  
  <pre><code>var fs = require ('fs');
  var http = require ('http'); 
  var path = require ('path');
  
  http.createServer (function (req, res) {
      var filePath = path.join ('/home/cortana/Videos' + '/Annabelle.2014.HC.HDRip.XViD.AC3-juggs[ETRG].avi');
      var stat = fs.statSync (filePath);
      res.writeHead (200, {
          'Content-Type' : 'video/avi', 
          'Content-Length' : stat.size
      });
      var readStream = fs.createReadStream (filePath);
      readStream.pipe (res);
  
  }).listen (8999, '0.0.0.0');
  </code></pre>