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
~ 9 years ago

This lesson is really informative. Thanks !

Thomas
~ 9 years ago

How do you suggest handling errors that occur while piping?

Thank you for the great videos - Thomas

Ben Clinkinbeardinstructor
~ 9 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