# Interaction between Node-RED Editor and Runtime

**URL:** <https://discourse.nodered.org/t/interaction-between-node-red-editor-and-runtime/47639>\
**Category:** General\
**Created:** [25 June 2021 09:28 UTC](https://discourse.nodered.org/t/interaction-between-node-red-editor-and-runtime/47639 "2021-06-25T09:28:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![boehand](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/boehand/32/43882_2.png) [@boehand](https://discourse.nodered.org/u/boehand)\
**Post date:** [25 June 2021 09:28 UTC](https://discourse.nodered.org/t/interaction-between-node-red-editor-and-runtime/47639/1 "2021-06-25T09:28:50Z")

</div>

Hi Nick,  
hi Node-RED-Developers,

maybe you could help me and share with me some backgrounds of Node-RED. My question is: **How is the interaction between the Node-RED-Editor and the Node-RED-Runtime?**

As I understood right:  
**1. In the graphical Node-RED-Editor a program configuration is composed, which is passed to the Node-RED-Runtime in the form of an array of Json objects.**

```auto
[
    {
        "id": "926a347b.eed998",
        "type": "inject",
        "z": "dee51ddf.5dbb2",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 190,
        "y": 140,
        "wires": [
            [
                "f9e9096a.d22448"
            ]
        ]
    },
    {
        "id": "f9e9096a.d22448",
        "type": "debug",
        "z": "dee51ddf.5dbb2",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 350,
        "y": 140,
        "wires": []
    }
]

```

**2. The runtime goes through the array step by step and registers the corresponding Javascript modules with the appropriate configuration.**

```auto
module.exports = function(RED) {
    function LowerCaseNode(config) {
        RED.nodes.createNode(this,config);
        var node = this;
        node.on('input', function(msg) {
            msg.payload = msg.payload.toLowerCase();
            node.send(msg);
        });
    }
    RED.nodes.registerType("lower-case",LowerCaseNode);
}

```

**3. And then the JSON-parameter "wires" will be used to route the messages.**

**Where can I find step 2 (the registration) and step 3 (the message-routing) within the node-red core on github?**

I think the API for step 2 (the registration) is the following:  
[https://nodered.org/docs/api/modules/v/1.3/@node-red\_registry.html](https://nodered.org/docs/api/modules/v/1.3/@node-red_registry.html)

Best regards from Germany

Andreas

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 August 2021 09:29 UTC](https://discourse.nodered.org/t/interaction-between-node-red-editor-and-runtime/47639/2 "2021-08-24T09:29:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
