From the course: Advanced Node.js

Unlock the full course today

Join today to access over 23,500 courses taught by industry experts.

Writable streams

Writable streams - Node.js Tutorial

From the course: Advanced Node.js

Writable streams

“

- [Instructor] What are we gonna do with all of this data that we've been reading with these readable streams? I hope we're gonna do more than just log it to the console. This is where the readable streams counterpart comes in handy, the writeable stream. Writeable streams represent a destination for incoming data. Writeable streams can be used to capture the data from a readable source and do something with it. Just like readable streams, writeable streams are everywhere. HTTP client request and server responses are writeable streams. The file system has writeable streams. Process.stdout and stderr, they're writeable streams. And just like readable streams, writeable streams are published in countless NPMs. So let's go ahead and take a look at what it looks like to use a writeable stream. Inside of our index.js we have here a readable stream setup. Now this is in your lesson files under chapter two, chapter two lesson four, and this is similar to the file that we created earlier. The…

Contents