IBM Developer Day | Bengaluru | March 14th Register now
Tutorial
By Luiz Gustavo Ferraz Aoqui, Bradley Steinfeld | Updated July 26, 2017 - Published August 8, 2014
CloudConversationIoT
Node-RED is a new open-source tool created by the IBM Emerging Technology team that lets you build applications by simply wiring pieces together. These pieces can be hardware devices, web APIs, or online services.
On IBM Cloud it’s easy to create a new Node-RED runtime. With just a few clicks you have a working environment, ready for you to create your new application. In this article, we’ll show you how to build—in just a few minutes—a real-time chat application on Node-RED using IBM Cloud.
Run the appGet the code
Try IBM Cloud for free
Build your next app quickly and easily with IBM Cloud Lite. Your free account never expires, and you get 256 MB of Cloud Foundry runtime memory, plus 2 GB with Kubernetes Clusters. Get all the details and find out how to get started. And if you’re new to IBM Cloud, check out the IBM Cloud Essentials course on IBM Developer.
Every Node-RED application can be imported and exported using the JSON format. So let’s import our chat app into the new sheet.
nodechat.json
Import from…
Clipboard…
We will explain what each piece does later on in this article, but now it’s time to deploy and run your application.
http://[app name].mybluemix.net/chat
[app name]
In this section, we explain the code behind our application in more detail. You can skip this section, but we recommend you read through it to better understand how the app is built and to learn more about how Node-RED works.
WebSocket in
Function
WebSocket out
_session
msg
HTTP in
Template
HTTP out
[get] /chat
div
ws
send
Node-RED simplifies code development by providing us with a set of nodes ready to be wired together and used. As shown in this article, it takes very little work to have a server set up on IBM Cloud to use in your projects. You can enhance this simple chat application even more by adding new nodes and creating new flows to connect to the existing ones.
Conference
May 6, 2019
São Paulo
AnalyticsArtificial Intelligence+
September 23, 2019
Back to top