Use Streams in Express

Share this video with your friends

Send Tweet

Streams are a big part of Node's famous non-blocking I/O, and Express lets you take full advantage of them. This lesson demonstrates how to integrate streams into your server to improve performance and simplify your code.

We will look at .creatReadStream, .createWriteStream, and .pipe to read and write from streams.

Ram Kris
Ram Kris
~ 5 years ago

This lesson is really informative. Thanks !

Thomas
Thomas
~ 5 years ago

How do you suggest handling errors that occur while piping?

Thank you for the great videos - Thomas

Ben Clinkinbeard
Ben Clinkinbeard(instructor)
~ 5 years ago

Hey Thomas,

I think you'd just set up error handling the way you would any time you're using streams, and then make sure you send an appropriate error status with the response.

HTH, Ben