How to Install Nodemon Module in NodeJS Application

Posted on

Introduction

This is another article installing a specific module in NodeJS application. Actually, for developing a NodeJS application, there are lots of modules available to support the development of it. In this article, the module for supporting the development is a module with the name of ‘nodemon’. Before the module is available in the NodeJS application, just install the module. After successfully installing the module, just use it in the NodeJS application.

Installing Nodemon Module in NodeJS Application

These are steps for installing Nodemon Module in a NodeJS application :

1. First of all, just access the server or the machine where the running NodeJS application exist. Access it in any means available either directly or remotely. For further reference, just access the article with the title of ‘How to Remote CentOS Virtual Server running in a VirtualBox with a NAT Network using SSH’ in this link to look at how to remote a server or a machine. It shows how to remote a virtual server for an example.

2. Soon after, just access the command line interface exist in it.

3. Following the second step, execute the command for installing ‘nodemon’ module. For installing modules, just check an article with the title of ‘How to Install a Package using npm tool’ in this link. The second article is available with the title of ‘How to Install a Specific Package using npm via Command Line’ in this link. The third one is an article with the title of ‘How to Install Package using npm via Command Line’ exist in this link. The fourth one is in this link with the title of ‘How to Install Package Dependencies in Node.js Application using npm’. The last one is an article with the title of ‘How to Install a Specific Package using npm via Command Line’ in this link.

In conclusion, just execute the following command :

The following is the comamand for installing a specific module with the name of ‘nodemon’.

npm i nodemon

The execution of the above command exist in the following real situation :

[admin@10 db]$ npm i nodemon

added 50 packages, and audited 51 packages in 5s

found 0 vulnerabilities
[admin@10 db]$

Testing Nodemon Module in NodeJS Application

This part is the last part. It is a part to confirm the existence of the module. Just execute the following command to check whether the express module is available or not :

[admin@10 nodejs]$ npm list
nodejs@ /home/admin/nodejs
├── express@4.17.1
├── mysql@2.18.1
├── mysql2@2.2.5
├── nodemon@2.0.7
└── sequelize@6.5.0

[admin@10 nodejs]$

As it shows in the output above, there is a module with the name of ‘nodemon’ from the previous installation above. The execution command above is ‘npm list’. Furthermore, for the sake of testing purpose, just execute the actual command of and ‘nodemon’. It is a command to check whether the nodemon module installation is a success or not.

[admin@10 db]$ npm list
db@ /home/admin/nodejs/db
├── express@4.17.1
├── mysql@2.18.1
├── nodemon@2.0.7
└── sequelize@6.5.0

[admin@10 db]$
[admin@10 db]$ nodemon
  Usage: nodemon [nodemon options] [script.js] [args]

  See "nodemon --help" for more.

[admin@10 db]$

As in the above command output, the nodemon module is available and exist for further execution.

Leave a Reply