article by Frank Nimphius, September 2020

 

The Oracle Bots Node SDK provides a complete environment for creating custom components. In this article I explain the use of nodemon to automate the restart of the Oracle Bots Node SDK integrated Node server during debugging and local testing.

Note: The image below shows a summary slide of what is contained in the Oracle bots node SDK and where to get it from.

 

Each custom component project you build using the Oracle bots node SDK has an integrated Node server you can use to run the custom component service project locally on your PC or laptop. This server is extremely useful when debugging your custom component as explained on the slide below

 

The problem with local debugging is not really a problem but an inconvenience, which is that the Node server need to be restarted each time you apply a code change to a custom component. This however can be automated using a Node utility called nodemon

1. Install nodemon by issuing the following command on a command line or terminal

npm install -g nodemon (Windows)

sudo npm install -g nodemon (MAC)

2. Start the bots node sdk server. Navigate to a custom component project folder and issue the following command

nodemon –exec bots-node-sdk service

The image below shows the command in a terminal window for MAC

Then, whenever a custom component gets changed in the project, the Node server gets started as shown in the image below

Related Content

TechExchange Quick-Tip: How to add version control with GIT to your custom component projects

TechExchange – Tutorial: How-to Debug Custom Component Services Deployed to Oracle Digital Assistant Skill Bot Local Component Container

TechExchange Quick-Tip: Customizing the Oracle Bots Node.js SDK Component Template

 

Author