Developer

Node-RED

Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.

Node-RED is based on Node.js, the applications run as a web server, and you customize and manipulate functional “flows” from any computer’s browser, local or remote. Every Node-RED application consists of nodes which are linked together to form the logical flow of your application. The nodes typically fall under input, operation or output. Node-RED provides a browser-based UI for creating flows of events, it can be run at the edge of the network or in the cloud.

IBM provides a version of Node-RED customized to run in IBM Bluemix, you can choose a boilerplates with a starter kit. You can use the editor to start creating flows right away, however, you might also want to make you own customization to Node-RED itself. The IBM version provides the classic input, output and functions nodes, but the GREAT difference with the other version is the opportunity to try the new Social APIs, the Alchemy APIs and, last but not least, the Watson APIs.

node-RED
IBM node-RED cognitive nodes

So I created applications on Bluemix, the thin RED line at the address thethinredline.mybluemix.net . I created my first flow, a sort of “Hello World” flow, I put together an input http node, a function node, and a http response node.

First one I dragged in the editor window the http input node, with method GET and URL where my application is able to respond to the web requests:

http endpoint node-RED
http endpoint node-RED

Second I dragged in the editor the function node, I set the message payload, in my example I write a simple html code in msg.payload method

function node - node-RED
function node – node-RED

Third I dragged the http response node, at the end these three nodes are then wired together. The complete flow is the following:

my Node-RED on Bluemix
my Node-RED on Bluemix

It’s possible to test the final result at the http://thethinredline.mybluemix.net/info where the output is:

node-RED output
node-RED output

My comments: Node-RED is a platform that has many different applications, a platform that anyone can contribute with custom nodes, the nodes are an abstract away more of the coding, to make Node-RED useful for people without knowledge of programming.

I think it’s very fun to develop in this way and I will use it in the next future !

Stay tuned 🙂 Comments and feedback are welcomed.

 

Related Articles

Back to top button