The nodemon Module is a module that develop node.js based applications by automatically restarting the node application when file changes in the directory are detected. Nodemon does not require any change in the original code and method of development.
Advantages of Using nodemon Module:
- It is easy to use and easy to get started.
- It does not affect the original code and no instance require to call it.
- It help to reduce the time of typing the default syntax node <file name> for execution again and again.
Installation: Install the module using the following command:
npm install -g nodemon
After installing the module you can check the current version of the module by typing on console as shown below:
The nodemon wraps your application, so you can pass all the arguments you would normally pass to your app:
nodemon [your node app]
Options available for nodemon are shown below:
Steps to run the program: Use the following command to run the file as shown below:
It automatically check the statements and the syntax of the program while writing new statements and show the result on the console.