On one RPI I have node-red with multiple instances, one running stable with MQTT/devices.
The second is used to do more/additional development on the flows. I wonder if there is a way to not "double" install nodes on the development side, but if there is a global setup.
My stable installation is on :1880 and the development side is on :2000.
So how can I deal with only one installation of the required nodes on both sides?
Honestly, I wouldn't bother. In any case, you might well at some point, want to have different nodes or different versions of a node installed. The act of installing/removing nodes is so easy that any "optimisation" is likely to be worse than double management.
Certainly my dev environment is very different to live. Then I also have a clean
install for testing things with no chance of pollution from a dev setup. I also use that when doing instruction videos.
Each of my environments has its own dedicated install of Node-RED.
Just to add my 2c.
This is built in, and can be configured with settings.js
Therefore, dedicate a node_modules
folder, that is then referenced by both instances.
The great thing here, the instances will also load modules they have exclusively (via the node_modules
folder in the each user dir)
I have tested this - and it works
You can have (for example) /usr/shared/Node-RED/node_modules
When it comes to installing the nodes that are to be used by both,
cd /usr/shared/Node-RED
npm install ****
As installing nodes within the UI, will install to that instance only
Yes, very good point. Then you could have a core set that were common and others that were not.
Just note that the ones in the nodesDir
, I don't believe can be managed via the Editor's palette manager. Which is probably what you'd want in this case anyway.
However, I still think that it isn't worth it just for 2 environments.
Correct - I can't for example remove them via the UI, its a manual affair for the shared nodes
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.