nodemon
During the development process, every time we make changes to our controlling Js file, we have to restart our local server. There is a much better way. There is a package in the npm registry called nodemon.
According to the documentation, 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. *note: nodemon will try to read "main" from package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee, .litcoffee, and .json by default.
nodemon does not require any additional changes to your code or method of development. nodemon is a replacement wrapper for node. To use nodemon, replace the word node on the command line when executing your script.