“Farewell to Nodemon. Have you checked out Watch Mode in Node.js?”
1 — Nodemon the life saver
Nodemon is a third party tool for Node.js developers. It automatically reloads your app when you make code changes, saving you time and preventing frustration from manual restarts. It’s super easy to set up and works well with many dev environments.
2 — But , Is it the Best one ?
Nodemon does experience certain issues. Its reliance on a third-party tool, which might cause compatibility issues and increased security threats, is one disadvantage. A different problem is the potential for higher overhead because nodemon might use more resources. Furthermore, nodemon could not be as seamlessly integrated with Node.js .which could cause compatibility problems and make debugging more challenging.
3 — Watch Mode to the rescue
It’s a pretty neat feature that automatically reloads your app whenever you make code changes. No more manual restarts and no more frustration from inconsistent states in your app. Watch Mode is integrated directly into Node.js, making it super convenient to use and debug.
To Run your app in watch mode , all you have to do is add the “ watch “ flag while running your node server
node --watch app.js
Happy coding!