DEV Community

Rittwick Bhabak
Rittwick Bhabak

Posted on

Node.js Crash Course - Part 5 - NPM

NPM is already installed if node is installed.
I believe that what pip is to python, npm is that in node.

Installing nodemon globally: npm install -g nodemon
Globally means nodemon will be available from anywhere in local machine, not for any particular project only.

nodemon enables a live reloading server for development.

To install a external package only for the particular project we've to run, for example to install lodash for a particular project we've to run npm install lodash.

1. package.json file

package.json file keep tracks of the information and most importantly the dependencies of the project.
To keep the track of the dependencies of the project we've to have a package.json file.
To initialize this file the command is npm init

During sharing node.js project 'node_modules' folder is not shared generally.
To reinstall the modules we've to run npm install.

Top comments (0)