Node.js

Updated Sept 17, 2020 · 4 min read

What is Node Package Manager?

Node Package Manager (npm) is a tool that comes with every Node.js installation. It provides a set of reusable components that you can install from an online repository called the npm registry. npm also consists of a command-line client that interacts with the npm registry.

The npm registry

npm doesn't vet submissions to the npm registry, meaning that packages in the registry can be insecure or malicious. It relies on users to report packages that violate their policies.

Package installation

npm makes it easy to install packages from the npm registry. From your command-line interface (CLI), you can install a package called express by running the following command:

npm install express 

Once you install a package, you can require the files from the package by adding the following to your code:

var express = require('express'); 

Related Terms

Programming
Backend

The backend is the part of a software program that end users can’t see, sometimes referred to as the data access layer. It includes the...

Programming
JavaScript

JavaScript (JS) is a free programming language that sets the dynamic behavior on most websites. The dynamic behavior can mean animated...

Programming
Node.js

Node.js (or Node) is a free backend JavaScript runtime environment that lets developers execute JavaScript code outside of a browser.

Programming
Repository

A repository (or repo) is a central location where files, data, software, and other content are stored and maintained.