Create a simple web page
In this section, you will create a basic “Hello World” web page by using Node-RED.
- Open the flow editor in your instance of Node-RED.
2.Create a new flow tab by clicking +.
3.Double-click the new tab and enter a name for the new flow tab. Then click Done.
4.Drag and drop an input http node onto the canvas. Use the filter nodes search field to find the nodes.
5.Drag and drop an output http response node onto the canvas.
6.Drag and drop a template node onto the canvas between the http and http response nodes.
7.Wire the three nodes together.
8.Double-click the template node to edit it. Enter the following simple HTML code:
<div>Hello to Watson on Node-RED</div>
9.Click Done to save your changes.
10.Double-click the input http node. Edit it to create an HTTP route to your web page by entering
/<some string> in the URL field. Enter a name such as
HTTP Hello World.
11.Click Done and deploy your changes.
12.Open a new browser tab and navigate to your new web page. The web address will be based on your Node-RED web address that is appended with the URL of your web page.
You should see your “Hello World” web page.