What is Node.js?
Is it a framework? Or Is it a programming language? Most people are confused if it's a framework or a programming language. It is open-source and Free. It is a cross-platform (runs on various platforms (Windows, Linux, Unix, Mac OS X, etc) application to develop server-side and networking applications.
Node.JS is a library for running web applications, and Node.js runs the V8 JavaScript engine, which is built on Google Chrome; outside of the browser, Node.js for building back-end services like APIs like Web App or Mobile App.
Node.js = Runtime Environment + JavaScript Library
Features of Node.js
Node.js is different from other programming languages to build back-end services; I am going to explain.
- It's easy to start and can be used for prototyping with agile development
- It provides fast and highly scalable services
- It's easy for a JavaScript programmer to build back-end services using Node.js because JavaScript uses everywhere.
- Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
- Node.js is never buffering any data.
- It has Asynchronous or Non-blocking nature.
Advantages of Node.js
- Easy Scalability
- Real-time web apps
- Easy to learn and code
- Advantage of Caching
- Data Streaming
How to Install Node.js and NPM on Windows?
Download the Installer
Download the Windows Installer from Nodejs official website (https://nodejs.org/en/download). Make sure you have downloaded the latest version of NodeJs. It includes the NPM package manager.
Begin the Installation Process
Picture 1. The installer will ask you to accept the Node.js license agreement. To move forward, check the "I accept" box and click Next:
Picture 2. If you don't want to change the directory, go with the Windows default location and click the Next button again.
Picture 3. It is a Custom setup option. Click the Next button if you want a standard installation with the Node.js default features.
Picture 4. Node.js offers you options to install tools for native modules. If you're interested in these, click the checkbox to mark your preferences or click Next to move forward with the default.
Picture 5. Lastly - click the Install button to begin the installation process
Picture 06: Click on the Finish button to close the Node.js installer
Check Node.js and NPM Version
If you doubt whether you have installed everything correctly or not, let's verify it with "Command Prompt".
Picture 7. Command Prompt window will appear on the screen.
To verify the installation and confirm whether the correct version was installed,
Enter the following command.
Node --version or Node -v
And to check the npm version, run this command.
npm --version or npm -v
Picture 8. The Installed version of node.js is v18.10.0, and npm is 8.19.2.
Summary
In this article, we learn what Node.js is, What are features of Node.js, what the use of Node.js is, and how to download and Install npm in Node.js.