How to change a node in a stream file

How can I change the node in the stream file and then restart nodered to detect the changed part and redeploy it?

I do not understand your question. Can you expand your explaination.

thank you
I now have a requirement:
Take a nodered stream running on a host, send it to a nodered on another host, and let it run. (The existing method is to import the stream manually and then import the stream in another nodered, but I want to be able to deploy the stream automatically on that other host)

The simplest to understand. How to automate the stream import function, and automatic deployment.

I am confused on your use of the word ‘stream’. I believe you mean the ‘flow’.

‘Flow’ is used to describe an instance of all the nodes that are connected together on a tab in the editor AND it also describes the contents of everything in the editor.

There is no built-in method to automatically send a flow to another device and have it import and deploy.

There have been similar questions similar to yours and you can do a search of the forum to see what is happening with them.

How can I call the import function function in the editor? I can use external node.js to embed nodered and control the automation of the import

You cannot remotely import flows into the editor.

You can use the http admin API to update the flows in another runtime: Admin API Methods : Node-RED

How do I call the import function in the editor?

You cannot, from node.js/runtime code, import flows into the editor.

Do you mean "how can I set/change the flows used by Node-RED in the runtime?"

If you are trying to do this remotely, the HTTP Admin API I have linked you to is what you use. The /flows API is what the editor uses when you click the Deploy button.

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