Nodemon with node.js

Nodemon with node.js

Table of contents

No heading

No headings in the article.

Nodemon is a useful tool for Node.js developers that automatically restarts your Node.js application whenever changes are detected in your code. This can save you a lot of time and effort as you no longer have to manually stop and restart your application every time you make changes to your code.

Install Nodemon globally using npm:

npm install -g nodemon

Install Nodemon locally using npm:

npm i -D nodemon
 "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js",
    "dev": "nodemon server.js"

  },
In the given package.json file, the scripts section defines a set of commands that can be executed using npm.

To start nodemon use the following command:

npm run dev

Now, whenever you make changes to your code and save your file, Nodemon will automatically restart your application, allowing you to see the changes you made without having to manually stop and restart your application.

Uninstalling nodemon:

npm uninstall nodemon

video Link:

Conclusion

Nodemon is a useful tool that can save you a lot of time and effort when developing Node.js applications. By automatically restarting your application whenever changes are detected in your code, you can quickly see the effects of your changes and focus on developing your application without having to worry about manually restarting the application.

Did you find this article valuable?

Support MadCoding7588 by becoming a sponsor. Any amount is appreciated!