Writable Streams: Writing a Stream and Backpressure

Learn how to write to a stream and the backpressure mechanism.

We'll cover the following

A Writable stream represents a data destination. Imagine, for instance, a file on the filesystem, a database table, a socket, the standard error, or the standard output interface. In Node.js, it’s implemented using the Writable abstract class, which is available in the stream module.

Writing to a stream

Pushing some data down a Writable stream is a straightforward business; all we have to do is use the write() method, which has the following signature:

Get hands-on with 1200+ tech skills courses.