JS & TS FeaturesLesson 37Free preview
Node Process
This lesson is part of Node.js · All levels
Summary
The global process object contains information and control over the Node process running. Through the process you can read the environment variable, the command line argument, set the exit code, and handle the termination signal. This ability is essential for configuration of applications and smooth shutdown handling.
Key points
- Process.env read the environment variable for configuration
- Process.argv contains the command line argument
- Process.exit terminates the process with a certain status code
- 'SIGINT') handles Ctrl+C to keep the shutdown smooth
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.