Skip to content
Some useful Node-RED flows for a hackathon, when using IBM Cloud and a simple forward server with cors enabled.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
node-red-flows
simple_forward_server
simple_web_app
skills
.gitignore
LICENSE
NOTICE
readme.md

readme.md

Hackathons and Node-RED

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

Cross-origin resource sharing

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

Watson Assistant and custom output

You can use the Watson Assistant Skill and the Node-RED flow to follow the steps in the following video.

Using Watson Assistant

Setup

  1. Setup Watson Assistant Starter Kit

Setup Watson Assistant Starter Kit

Note: You can import this customized skill with the temperature intent to your Watson Assistant instance.

  1. Setup Node-RED Starter Kit

Setup the 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.

  1. Select manage palatte from the menu on right upper side of the page.

Node-RED_Select_Manage-Palette

  1. Now choose the tab install and search for Node-RED Dashboard press install.

Node-RED_Select_Manage-Palette

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.

  1. Open your Node-RED Application in IBM Cloud.

  2. Press create connection. The you can select you Watson Assistant service

Node-RED_Select_Manage-Palette

  1. Restage the application.

Now you can do the same steps I did in the video.

You can’t perform that action at this time.