Getting started with Node.js
Instead of blocking the thread and wasting CPU cycles waiting for a response, when Node.js conducts an I/O action, such as reading from the network, accessing a database, or accessing the filesystem, Node.js will resume the operations as the response comes back.
This allows Node.js to handle thousands of concurrent connections with a single server without having the burden of thread concurrency management, which may be a major source of bugs.
Ryan Dahl invented this amazing Node.js framework in 2009.
First of all, you have to download the Node.js installer from node web site. In this step you have to download it according to your operating system. You can visit the web site simply from this link. (https://nodejs.org/en/)
Secondly, you have to click the downloaded setup to begin the installation. Wizard will be appeared.
The node and npm binaries are added to your path when you install Node.js. That is to say, you can now use the node and npm commands.
You can just use Windows PowerShell or the Command Prompt to check if Node (and npm) were properly installed on your PC. You can type
node -v to check for the version of Node and
npm -v to check the version of npm you are using.
That’s pretty much it. You saw how to install Node and npm on Windows.
Advantages of using Node.js
Disadvantages of using Node.js
Major disadvantage in Node.js is reduces performance when handling Heavy Computing Tasks. To fix this, Node.js released the “worker threads” module in 2018, which allowed developers to run several threads at the same time. However, this technique does not fully prepare you to deal with CPU-bound computing difficulties. One of the most significant disadvantages is we have to do heavy code changes due to frequent API changes. And also, Node.js Asynchronous Programming Model. Hence, The callback might result in also known as callback hell. This directly impacts the performance and the quality of the code itself.
Without a doubt, Node.js is one of the most intriguing technologies in use today, and it has grown to become one of the most popular platforms for web apps, services, and desktop apps.