Earlier today, Dave pointed out
Nat's interesting template for running in "local mode" which makes it easier to run multiple instances.
This prompted me to do something I should have done ages ago and that is turn my own installation and project approach into a template and publish it.
Whereas Nat's approach runs a sub-process, I use a very standard node.js approach.
The main advantage to the embedded method is that you can run entirely independent instances of Node-Red that can even be at totally different version levels. All of your nodes and other modules can also be at different levels. You can also take more control of the Express server. It is also very easy to clone your installation, something I do regularly before updating node-red or key nodes or even before making significant changes to the flows.
More information in the
readme. Please feel free to raise issues and suggest improvements, pull requests as always welcome.
Please note that this initial version is as yet untested as I ripped it out of a live installation and then tweaked it heavily - as usual never enough time to do things properly. I'll be testing as soon as I can and when I'm happy, I'll bump the version to v1.0.0 - if you are able to test, that would be great.
Assuming it works, it is really easy to get going, simply clone the github repository, full instructions and guide to tweaking in the readme.