The process object helps you deal with standard input and standard output. With stdin and stdout, you can communicate with a process when it is running. In this video, learn how to begin coding a small application that asks questions using standard output.
- In the next couple of lessons, … we're going to build a simple question and answer app … that runs in the terminal. … So I'm going to start off by creating a new file … in our folder called questions.js. … Another feature of the process object … is standard input and standard output. … These two objects offer us a way to communicate … with this process while it's running. … For now, we're just going to use these objects … to read and write data from the terminal. … And, in this lesson, we're just going to be taking a look … at process.stdout. … So process dot standard output is a writeable string, … and it implements a write method. … So we can use this write method … to send data out of our program. … In this case, we can actually write a string … to the terminal. … So I'll do Hello space, … and then I'll do another call … to process.stdout.write World, … and we'll add a couple of new lines in there as well. … So I'm going to go ahead and open our terminal … and run this so we can take a look at the output. …
- 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.