Published on December 17, 2016 by ProgrammingKnowledge

The ‘pipe’ event is emitted when the stream.pipe() method is called on a readable stream, adding this writable to its set of destinations.

All Readable streams begin in paused mode but can be switched to flowing mode in one of the following ways:

Adding a ‘data’ event handler.
Calling the stream.resume() method.
Calling the stream.pipe() method to send the data to a Writable.
The Readable can switch back to paused mode using one of the following:

If there are no pipe destinations, by calling the stream.pause() method.
If there are pipe destinations, by removing any ‘data’ event handlers, and removing all pipe destinations by calling the stream.unpipe() method.

Leave a Reply

1 Comment on "Node.js Tutorial for Beginners 13 – pipes"

Notify of
avatar

Mostafa Elsayh
Guest
Mostafa Elsayh
1 year 5 months ago

how to deploy this app on the internet?

wpDiscuz