Node-RED 3 Improves Its Node Editor, Runtime Features, and Debugging

 2 months ago
source link: https://www.infoq.com/news/2022/07/node-red-3-released/?itm_source=infoq&itm_medium=popular_widget&itm_campaign=popular_content_list&itm_content=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Node-RED 3 Improves Its Node Editor, Runtime Features, and Debugging

Jul 17, 2022 1 min read

Node-RED, the flow-based visual programming environment originally developed by IBM and initially targeted at IoT applications, has reached version 3.0, bringing a number of improvements to the node editor, new features to control flows at runtime, and more.

The new node editor in Node-RED 3.0 includes a new special node type, called a junction that aims to make it easier to route wires. Junctions allow developers to reduce clutter caused by connections between nodes and make the overall flow lighter on the eye.


Additionally, the node editor sports a new context menu providing easy access to commonly used features, such as creating a new node; cutting, copying, and pasting nodes; deleting nodes; exporting, and so on.

Debugging subflows has become easier in Node-RED 3 thanks to the debug sidebar, which can now display the full location of a node by just hovering over it. For example, if a node produces a debut output, be it a warning or an error, you hover on its name to know exactly where the node is located.

The new node editor adopts monaco as its default text editor, providing a richer user experience in comparison with ace, which remains available. Monaco is the editor engine that powers Microsoft Visual Studio Code and will become the only supported editor in Node-RED 4.

As mentioned, Node-RED 3 includes new features to control how you run your flows. In particular, you can now stop and start a flow from the editor. While a flow is stopped, you cannot inject messages into it or debug it, but you can edit it and deploy your changes. When you are ready, you can start the flow again. This feature is opt-in and you will need to enable it, if required, by setting the runtimeState option in settings.js:

runtimeState: {
   enabled: true,
   ui: true

As a final note, it is worth mentioning that the Template node can now access the environment using the syntax {{env.VAR_NAME}}.

There is much more to Node-RED 3 than what can be covered here, so do not miss the official announcement for the full details.

About the Author

Sergio De Simone

Sergio De Simone is a software engineer. Sergio has been working as a software engineer for over fifteen years across a range of different projects and companies, including such different work environments as Siemens, HP, and small startups. For the last few years, his focus has been on development for mobile platforms and related technologies. He is currently working for BigML, Inc., where he leads iOS and OS X development.

Show more

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK