Another important global object is the process object. Process helps you get information about the environment. You can access process from anywhere. Process.argv will help you interact with information about the current process. In this video, learn how to handle the process.argv array and how to take user input.
- Another important object that's available … to us globally is the process object. … So within my files I'm going to create a new file … and we're going to call the global process-dot-js. … So the process object can be accessed globally … and it contains information about … the current process as well as tools … to allows us to interact with that process. … So for instance, we can use the process object … to get the process ID. … Or we can also use the process object … to get the current version of Node.js … that's being used to run the process. … Process-dot-versions-dot-node. … And I can go ahead and open up my terminal … and run this file by typing node global process … and we can see the process ID as well as … the version of Node.js that's being used … to run this process. … With the process object, we can … get environment information, read environment variables, … communicate with the terminal or parent processes … through standard input and standard output. … We can also use it to exit the current process. …
- 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.