Node.js | A Light Intro to Events, Streams, Process, and Standard I/O (STDIO). The process Object - Events - Streams and STDIO. What is a Node.js process? That means that it can listen for of the event using the `on` method. The process.stdin property returns a stream connected to stdin
This article is a gentle introduction to some Node.js fundamentals. Feel encouraged to open up a Unix-like operating system and run the code using the command “node yourFile.js”.
We will cover:
The process Object
Streams and STDIO
What is a process? A process is an instance of a program that is being processed by a processor. A process has many properties. Node.js introduces the process object to reveal process properties.
//Here we count 'keys' of the process object. "use strict"; console.log(Object.keys(process).length); //68
As you can see, this instance of the process object has 68 properties.
As shown below, we can check the process ID and the processes memory usage.
"use strict"; console.log(process.pid); console.table(process.memoryUsage());
The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.
Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...