The main way Node-RED can be extended is to add new nodes into its palette.
Nodes can be published as npm modules to the public npm repository and added to the Node-RED Flow Library to make them available to the community.
Since Node-RED 1.3
There are some general principles to follow when creating new nodes. These reflect the approach taken by the core nodes and help provided a consistent user-experience.
Nodes should:
be well-defined in their purpose.
A node that exposes every possible option of an API is potentially less useful that a group of nodes that each serve a single purpose.
be simple to use, regardless of the underlying functionality.
Hide complexity and avoid the use of jargon or domain-specific knowledge.
be forgiving in what types of message properties it accepts.
Message properties can be strings, numbers, booleans, Buffers, objects, arrays or nulls. A node should do The Right Thing when faced with any of these.
be consistent in what they send.
Nodes should document what properties they add to messages, and they should be consistent and predictable in their behaviour.
sit at the beginning, middle or end of a flow - not all at once.
catch errors.
If a node throws an uncaught error, Node-RED will stop the entire flow as the state of the system is no longer known.
Wherever possible, nodes must catch errors or register error handlers for any asynchronous calls they make.
Node-RED: Low-code programming for event-driven applications.
Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy