What is NPM?
Components of NPM
- NPM Registry:- The npm registry is an extensive database of npm packages that developers can publish and download from. It is a repository of reusable code that developers can use in their projects. Developers can publish their packages to the npm registry by using the “
npm publish” command.
This command takes the code and other assets in the current directory and packages them into an npm package, which is then uploaded to the registry.
- CLI:- The npm Command Line Interface (CLI) is a command-line tool that allows you to run npm commands. These commands allow you to perform various tasks related to npm, such as installing packages, publishing packages, and managing dependencies.
To use the npm CLI, you will need to have Node.js and npm installed on your computer. Once you have these tools installed, you can open a terminal or command prompt and type
"npm” followed by the command you want to run.
What is Node.js?
Node.js also comes with a package manager called npm, which stands for Node Package Manager. npm makes it easy to install and manage packages (collections of code and other assets) that you can use in your Node.js applications. There are thousands of open-source packages available on the npm registry, which you can use to save time and build robust applications more quickly.
Node.js is widely used in the development of web applications, and it has a large and active developer community. It is supported by several companies and organizations, and it has a strong ecosystem of tools and libraries that make it easy to build and deploy applications.
The minimum system requirements for installing and running Node.js are:
- A processor that supports the SSE2 instruction set (most processors made in the past 10 years support this)
- At least 512 MB of RAM
- A hard drive with at least 50 MB of free space
These requirements are quite low, and most modern computers should easily meet them. However, the actual system requirements for a specific Node.js application will depend on the needs of that application. If you are building a resource-intensive application, you may need a more powerful machine with more RAM and faster processors.
In terms of operating systems, Node.js is supported on the following platforms:
- Windows 7 and later
- macOS 10.12 (Sierra) and later
- Most flavors of Linux, including Ubuntu, Debian, and CentOS
You can download the latest version of Node.js from the official website at https://nodejs.org/
How to install Node.js and NPM on Windows?
To install node js on your system visit the above link and download the latest LTS(Long Term Support) version of node js.
Once downloaded you can install it as any package installed on your windows machine. Follow the image below for your reference.
You are now ready to run your js inside Nodejs. Just open your Command Prompt and run the command “node”