Package Link: https://www.npmjs.com/package/sm-watcher
sm-watcher is command-line tool that helps with the speedy development of Node. js applications. It monitors your project directory and automatically restarts your node application when it detects any changes. This means that you do not have to stop and restart your applications in order for your changes to take effect. It works same as nodemon but I have removed unwanted consoles that occurs in nodemon.
1 First fork and then clone this repository ( you can also clone only but after forking you can merge new changes in future)
NOTE:- At this moment npm start will work only for index.js file, and if you want to change file just goto package.json file and replace filename in "start":"sm-watcher index.js" to your updated filename and keep other command as it is.
Second way is more dynamic and customizable, here you can set your command and start your server on any file as you want.
Run sm-watcher filename.js to run the same command here you can type any filename that you want to run.
For example :-> if you want to run the server with your name command like "hanumat filename.js"