Create a simple REST Service using Node-RED on BlueMix

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to my screencast my name is Adrienne Solis and today I will show you how to create a simple rest service using no dread on bluemix so let's begin no dread is a visual tool for wiring the Internet of Things developed by IBM you'd find out more about node red at node red org let's begin by logging into bluemix navigate to bluemix net and click on the log in and use your credentials after logging into bluemix the landing page is the dashboard from here we can click on the catalog we will see boilerplates you'll see runtimes and you'll see services such as watson what we are interested in are the boiler plates so let's click on the node-red boiler plate and create an instance of node red let's name this instance of node red and we're going to click create and this process will take around a minute now that the node red instance has been created let's scroll down to our applications and click on the node red instance that we just created and then you can see that our app is running let's click on the routes this is a URL to our node red editor it'll open up in a new browser tab let's click on the go to node red flow editor now we will develop a simple rest service which will echo back the request parameters so to do this we will use the HTTP request input node we will use the HTTP response output node we will wire these two together let's double click on the HTTP input node we will implement the get method and let's enter a URL of hello world let's go ahead and name this input node as an HTTP request now the payload of the HTTP request will be parsed as a JSON object and pass to the HTTP response plus double click on HTTP output node and name it HTTP response and that's it now for debugging purposes let's go ahead and add and output a debug output which will dump the payload into the debug console I'll wire the output of the HTTP request to the payload let's deploy this flow now that it is deployed let's put our focus on the debug perspective and let's go ahead and test this test is simply by getting the first part of the URL let's copy that open a new web browser or tab paste the URL in here and let's use the URL that we specified on the HTTP input node hello world and let's pass in a couple of parameter how about color equal blue and rating equal good and let's hit it this is showing the JSON response of our flow if we go back to the node red flow editor in the debug you see the payload color blue rating good in summary I demonstrated how to log in to bluemix make an instance of node red and create a very simple rest service thanks for watching
Info
Channel: Adrian Solis
Views: 14,961
Rating: 4.8961039 out of 5
Keywords: BlueMix, Node-RED, REST Service, NodeRed, REST, IBM, Cloud, Node.js (Software), JSON, IoT
Id: GIkoFnK8hXY
Channel Id: undefined
Length: 5min 15sec (315 seconds)
Published: Thu May 28 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.