Install Nodemon
Learn how to install Nodemon to avoid restarting our server every time we make a change.
We'll cover the following...
Notice that we’re manually restarting the server every time we make a code change, which is too time-consuming.
Nodemon
Enter Nodemon, a development tool that monitors Node.js applications and automatically restarts the server whenever it detects file changes.
- Install the nodemon package globally:
Press + to interact
npm install -g nodemon
A global installation is performed using the -g
flag. Installing a package globally allows it to be used across all Node.js applications. The package won’t be included in the project dependency; instead, it will be installed in a global location on the machine.
The npm root -g
command will tell where that exact location is on the respective machine.
On macOS or Linux, this location ...