You can list what packages are installed globally in your system with
npm -g list—shorthand for
npm --global list—whereas you'd list the packages installed in an NPM project with
Let's see an example of what the command might return.
npm -g list # /opt/homebrew/lib # ├── email@example.com # ├── firstname.lastname@example.org # ├── email@example.com # ├── firstname.lastname@example.org # ├── email@example.com # ├── firstname.lastname@example.org # ├── email@example.com # └── firstname.lastname@example.org
nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.
How to install it globally?
npm install -g nodemon
Then you can use it anywhere as
nodemon script.js and, every time
script.js changes, the execution will restart with the new code, avoiding repetitive calls to
node script.js, for instance.