Answered
I've seen the npm install -g <package>
command used in several different places, but can't figure out what the -g
option does.
That installs the package globally on your local machine, which means you can install the package anywhere.
For example, let's say you installed the nodemon NPM package globally on your machine:
npm install -g nodemon
You could then use it anywhere on your machine to run Node.js applications:
nodemon <your Node.js app>
Installs a NPM package globally on your machine.