I'd love to do the following without restarting Node-RED server:
Adding new nodes
Removing nodes
Updating a node's behaviours and appearances
I want user to simply reload the Node-RED page in the web browser to have all these up to date.
#3 seems doable:
With JS, I imagine dynamic behaviours can be achieved through some dependency injection tricks, but not sure if I can change certain things such as a node's name, colour, or its editor layout without restarting node-red.
But I'm not sure how to make #1 and #2 happen.
Are there any standard facilities or best practice regarding this with Node-RED?
For example, this make little sense by itself. I mean what is it you expect? For contrib nodes to be automatically updated because the user refreshed their browser? How do you expect the runtime (where nodes run - server side) to be instructed that an update is needed?
I am certain you know what you want/need but it isnt 100% clear to me.
In which case it sounds like you need to provide your internal node-red servers with an internal custom catalog so that your private nodes can be presented to the private node-red servers
I too have a question about restarting or “reloading” Node-RED; possible from the API?
Use case:
I have a node that syncs functions and templates for use with an external editor; in the latter part it alters the flow file and currently instructs users to “restart node red to see changes take effect”.
Another use case with hack:
I created a project for creating nodes and when alterations are made refreshing the browser is trivial; but restarting Node-RED is essential to pickup changes to node_modules. This is probably too low-level as it’s more than just altering nodes and deploying. To accomplish this, it uses an exec. shell to re-start Node-RED but this requires that it knows where Node-RED is and is aware of the prior PID. It’s complicated and not FlowForge compatible but its target is lower level Node devs anyways.
Perhaps just for flow2src, is there anyway to invoke reloading a project’s flow file from the API?