What Is a Node.js Stream?

Описание к видео What Is a Node.js Stream?

See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/what-str...

Streams are a built-in Node.js language feature that represent an asynchronous flow of data, and are a way to handle reading/writing files. They’re meant to be like Unix pipes, allowing us to hook up a data source one end, any number of consumers on the other end, and pass data between them. Node streams can help you process a file that’s larger than your free memory space because, instead of a program reading a file into memory all at once, it processes data into smaller chunks.

By the end of this tutorial, you should be able to:

- Define what a Node.js stream is
- Understand the limitations of reading an entire file into memory
- Know what are the benefits of, and use cases for, Node streams
- Understand some of the events streams emit
- Learn what pipe does in Node, and how to connect streams using pipe
- Use the fs module to create Node streams from files
- Know how to handle stream errors in Node

Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.

Комментарии

Информация по комментариям в разработке