npm initto initialize a project
-gflag is a shorthand for the
globalconfiguration which sets the package install location to the folder where you installed NodeJS.
This is useful when you need to run the package from the command line instead of using
require()and import it to your code.
Soption is the Save option in npm. It adds the npm package to your dependencies for your project. You can also add the dependency manually by editing the package.json file.
To remove a dev dependency, you need to attach the
--save-devflag to the npm uninstall, and then specify the name of the package.
Find unused npm packages in package.json