Menu BAR

FEEL FREE TO ASK ANY PROGRAM and please mention any error if you find it

6 Feb 2024

NODE JS - NPM


 1) What is NPM?


- Node Js npm (Node Package Manager) is a package manager for JavaScript, which is used for managing dependencies in Node.js applications.

- With npm, we can easily install, manage, and update packages (Libraries/ Modules) that you can use in your applications.

- www.npmjs.com hosts thousands of packages to download and use

- To install a package using npm - 
npm install package-name

   This will download the package and add it to your node_modules directory, along with dependencies.

- Example - 
                    To install Express, you can run the below command - 
  npm install express
or
npm i express

- Always include the installed package in your package.json file by adding them to the dependencies section.

No comments:

Post a Comment