NPM is the package manager used in Node.js projects to install packages/libraries, manage versions, and run project scripts. When you start a Node.js project, the package.json file acts as the project's ID card.
# Start a new Node.js project
npm init -y
# Install Express for server development
npm install express
# Install nodemon only for development
npm install --save-dev nodemonnpm init -y creates package.json with the default settings. npm install express adds Express as a dependency needed when the app runs. --save-dev is used for packages that are only needed during development.
package.json package-lock.json node_modules/Info
You don't need to upload the node_modules folder to hosting/GitHub. As long as you keep package.json and package-lock.json