In this video, learn about the stream interface in Node.js, how to create readable file streams, and how to load a large log file with a readable stream.
- [Narrator] The stream interface … provides us with the technique to read and write data. … We can use it to read and write data to files, … to communicate with the internet, … to communicate with other processes. … In fact we've already been using it. … We've been using the stream interface … to read and write data to and from the terminal. … I'm inside of the exercise files under chapter five, … chapter five lesson one within the start folder … and we are looking at the read stream.js file. … This code should look familiar. … We are using process.standard input to listen … to data events on the terminal. … So let me go ahead and run this file by … typing node readStream … and we'll see what's happening as its asking … us to type something, so we will type a chunk of text … in the sense that I've typed five characters of text. … If I type hello world we have 11 characters of text. … Process.standard input is a readable stream. … We read the data by listening to data events. … The file system also comes with a way …
- What is Node.js?
- Installing Node.js
- The global object
- Importing the core modules
- Creating custom events with the EventEmitter
- Reading, writing, and removing files
- Working with file streams
- Creating child processes with the exec and spawn functions
Skill Level Intermediate
Node.js: Real-Time Web with Socket.IOwith Emmanuel Henri1h 24m Intermediate
1. What Is Node.js?
2. Set Up Your Environnment
3. Node Globals
4. Node Modules
5. File System Basics
6. Files and Streams
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.