Hey gang, in this node js tutorial I’ll show you how we can write data from our read stream, into a writable stream. This is useful for sending data to a client (browser).

+ Repo –
+ Atom editor –

You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage…


========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – or

================== Social Links ==================

Twitter – @TheNetNinja –


  1. It turns out that it is not necessary to specify the '__dirname' in the createReadStream() function. Only the filename is enough. I guess we should stick to the convention anyways.

  2. Hi, I am trying to execute execsync after the write stream but that is giving error always as the write stream is not getting closed though I use stream.close(), but the exec call with the same file works well.. Any help to close the stream to run the execsync?

  3. thank you Sir for those valuable courses
    I just wanna know is the data separated for the stream
    I mean by what measures is that done ? is it according to the buffer's capacity or what ?
    thanks again…

  4. Nice Tutorial.. I had one question.. Can we use fs.write('writeme.txt',chunk) instead of creating a write stream? I mean, we are are receiving data in chunk but after every chunk we receive, we can just write it down to the writeme.txt file directly without creating a write "stream"…..

  5. Hi. this tutorial is so great and I have a question -> Can we define that amount of data when sending to the client in that buffer??

  6. Just curious, why don't you use EC6 notation? I was going through your playlists and saw you already have one on that.


Please enter your comment!
Please enter your name here