NPM – Use to stand for Node Package Manager, but not currently.
- NPM is an online repository where all the 3rd party packages are loaded
- It is a command line utility, where it reads package.json file and download all the dependencies required for that project.
- NPM is managed by a company called NPM INC
- packae.json is a setting file of npm that helps you configure and setup the project
Check is npm is using below command :
Initialize a NPM project :
Now package.json file is created, which will be contain all the dependency, packae.json is a setting file of npm that helps you configure and setup the project
It will look like below :
Using “npm run start” command you can execute the command “node index.js” and “npm start” is the short hand for “npm run start”
Download a dependency into your project and add it into package.json
npm install <package_name> Example : npm install moment
- Once the command is executed successfully
- The entry of this js will go inside package.json inside “dependencies” section
Read Me :
Package.json : https://docs.npmjs.com/cli/v6/configuring-npm/package-json