Specify node_modules folder in settings.js

I made some test and at the and I'm going to summarize it, hoping will be useful to the others.

  • Windows 10
  • main folder: .node-red (installation patch)
  • settings.js as it is (no change for userDir)
  • my_folder (new folder containing my node-red project. (running node-red with the option -u .....\my_folder)
  • create junction to .node-red\node_modules with the command mklink /J (as administrator)
  • create hard link to .node-red\package.json with the command mklink /H (as administrator)

From now on:

  • all the nodes must be installed from the main instance, the one simply running with node-red command
  • the "my_folder" node-red instance must be restarted in order to update the new installed nodes
  • the package.json inside "my_folder" apparently doesn't came update (if you open it won't see the new ones) but actually it's node-red instance will find all new nodes and works perfectly.
    Of course it would be better to update it as the others suggest
  • Don't to try to install/update nodes from the "my_folder" node-red instance. In this case the link to .node-red\node_modules will be broken (I don't know why), and you cannot install/update any nodes any more.

At this point, a part for the nodes, can someone tell me which are the files/directory to backup?
I think they are all but: node_modules (directory), .config.nodes.json (file). Is that correct?