In this github I will backup some Node-RED flows, which can be useful in Hackathons. Also I provide the basic guide, how to setup these flows.
The project also contains the applications
related to the topic Cross-origin resource sharing. This topic addresses the direct access from WebApplications to a REST APIs build on Node-RED flows.
Note: Peter Schleinitz (@PSchleinitz) made a demo guide based on this project, for more details please visit his github page Node-RED Watson Assistant Demo
When you use Node-RED on IBM Cloud during hackathons you will notice REST calls in flows cannot directly be invoked from a web application. The reason for this is mostly that cors (cross-origin resource sharing) is not enabled for the Node-RED server. This blog post is about using a simple workaround to address the given cors (cross-origin resource sharing) problem.
Related blog post:cors and Node-RED using a simple forwarding server
You can use the Watson Assistant Skill and the Node-RED flow to follow the steps in the following video.
- Setup Watson Assistant Starter Kit
Note: You can import this customized skill with the temperature intent to your Watson Assistant instance.
- Setup Node-RED Starter Kit
Inside Node-RED I use the additional Nodes from Node-RED Dashboard.
You have to add the Node-RED Dashboard before you import my customized flow.
- Select manage palatte from the menu on right upper side of the page.
- Now choose the tab install and search for Node-RED Dashboard press install.
To take advantage from the VCAP variable and the easy usage of service in IBM Cloud, you should bind the service to your Node-RED instance.
-
Open your Node-RED Application in IBM Cloud.
-
Press create connection. The you can select you Watson Assistant service
- Restage the application.
Now you can do the same steps I did in the video.