![]() ![]() Next StepĬontinue to expanding your Hello, world! flow. Click the Inject node again to send another message.Ĭlick the image to start and stop the animation.A “Hello, world!” message should appear in the debug window.Clicking the button is what will inject a message into the flow. Click the Inject node’s button, which is the blue square coming out from the left-hand side of the Inject node.Click the Debug tab in the right-hand side of the editor window.Now that our flow is complete, we need to deploy it to the server and run it. Click the image to start and stop the animation. The Debug node will automatically print the msg.payload property to the console window, which we’ll see in the next step. A gray wire should now be connecting the output of the Inject node to the input of the Debug node. Place the mouse cursor over the Inject node’s output port (a small gray square on the right-hand side of the node), then left-click and drag a wire over to the input port of the Debug node. From the node palette, select a Debug node and drag it onto the flow, and then place it to the right-hand side of the Inject node.We’ll use the Debug node, which will print out our message to the debug console window. ![]() We need a destination for the Inject node’s message. Later, with its msg.payload property set to “Hello, world!” this node is going to inject a message into the flow. For the Payload field, select string and enter Hello, world! in the text field.Double-click the node to open the “Edit inject node” view.From the node palette on the left side of the Node-RED editor, select an Inject node and drag it onto the flow.If you haven’t used Node-RED before, there should be one empty flow named “Flow 1”.If using Node-RED running on your computer, you can use :1880 or whichever address or hostname you’re using.If using a groov Edge Appliance, then open :1880.If using a groov EPIC processor, then open /node-red.If it’s not open already, open Node-RED in your browser.That’s one of the main purposes of the Inject node-to inject a message into the flow. Flows are a collection of connected nodes that messages pass through.įirst, we need a way to start the flow.Inside of a node, the message object is called simply “msg”.Many nodes will use the payload property by default. A very common message property is called the payload.Properties are basically a variable and can be numbers, strings, booleans, arrays, or objects. Messages have properties, which are values attached to the message.Nodes either generate a new message or process an incoming message.They are the basic mechanism by which Node-RED operates. Leave everything else as default and click Save. In the Target field, drop down the list and choose the name that you set for your service. Messages are objects containing data, and they flow from node to node. Click Resources > Workloads > Load Balancing.While this tutorial covers a very basic example, there are a few key concepts that should be discussed first: ![]()
0 Comments
Leave a Reply. |