How to embed node red to electron app?

My task is to embed node red to an electron app. The idea is that some functionalities are developed in node red, such as API calls which than passes the data to the electron app, or the app sends data to the flow's entry point(inject node) which than triggers the flow to run.
I already followed the instructions here (https://nodered.org/docs/user-guide/runtime/embedding) and included the code to the app. The node-red is up and running inside the app, but I don't know what options do I have to connect the two parts and pass data between them.

If you search for Node-RED and electron you will find lots of existing projects that demonstrate how to package Node-RED as an electron app.

I already checked one(https://github.com/dceejay/electron-node-red). Maybe I am wrong but my understanding of these projects that data is not exchanged between the app and the node-red flows. The trigger is coming from inside the flow and is dispayed on a node red dashboard.
The app which I am working on in is already a working app with a huge code base without node red.
In some cases I would like to "call" a flow's entry node to trigger it from the app, and in other cases I would like to trigger an event in the app when a flow is triggered and reached its "end" node

Okay, that is a different scenario.

It's up to you how you'd like the flows to be exposed to the electron app. You could create them as http endpoints, websockets, TCP or udp.

Or you could create your own custom nodes that expose them in code in some way your electron app can get ahold of.

1 Like

Thank you.

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