Node process.cwd() Method
The process.cwd() method is an inbuilt application programming interface of the process module which is used to get the current working directory of the node.js process....
read more
Node.js process.argv Property
The process.argv property is an inbuilt application programming interface of the process module which is used to get the arguments passed to the node.js process when run in the command line....
read more
Node.js process.stdin Property
The process.stdin property is an inbuilt application programming interface of the process module which listens for the user input. The stdin property of the process object is a Readable Stream. It uses on() function to listen for the event....
read more
Node.js process.env Property
The process.env property is an inbuilt application programming interface of the process module which is used to get the user environment. Syntax:...
read more
Node.js process.memoryUsage() Method
The process.memoryUsage() method is an inbuilt method of the process module that provides information about the current processes or runtime of a Node.js program. The memory usage method returns an object describing the memory usage in bytes of the Node.js process....
read more
Node.js process.hrtime( ) Method
The process.hrtime() method to measure code execution time which returns an array that includes current high-resolution real-time in [seconds, nanoseconds]. We measure the code execution time by providing the time returned by the first process.hrtime() call as a parameter in the second process.hrtime() call....
read more
How to kill all instances of a Node.js process via command line ?
Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside the browser. It is widely used in developing APIs and microservices from small to large companies....
read more
Node.js process.cpuUsage() Method
The process.cpuUsage() method is an inbuilt application programming interface of the Process module which is used to get the user, system CPU time usage of the current process. It is returned as an object with property user and system, values are in microseconds. Return values may differ from the actual time elapsed especially for multi-core CPUs....
read more
Node.js process.chdir() Method
The process.chdir() method is an inbuilt application programming interface of the process module which is used to change the current working directory. Syntax:...
read more
Node.js process.exit() Method
The process.exit() method is used to end the process which is running at the same time with an exit code in NodeJS....
read more
Difference between process.cwd() and __dirname in Node.js
NodeJS is a JavaScript runtime that was built on top of Chrome’s V8 Engine. The traditional JavaScript is executed in browsers but with Node.js we can execute JavaScript on servers, hardware devices, etc....
read more
Node.js Exit Codes
Node.js is a cross-platform, open-source back-end JavaScript runtime environment that uses the V8 engine to execute JavaScript code outside of a web browser. Node.js allows developers to utilize JavaScript to create command-line tools and server-side scripting, which involves running scripts on the server before sending the page to the user’s browser....
read more