TotallyInformation / alternate-node-red-installer

An alternative installer for Node-RED. Avoids global installs, no admin rights required.
MIT License
25 stars 5 forks source link

specify node-red version #4

Closed Steve-Mcl closed 3 years ago

Steve-Mcl commented 3 years ago

Hi Julian, I have read your README but cant see how I would specify the node-red version.

In particular I want to try out your alternative installer for testing node-red@2.0.0-beta.1

Sorry if I've missed something obvious.

TotallyInformation commented 3 years ago

Hi, the easiest way is run the script as usual, it will install the current live version of Node-RED.

Then issue the following command manually:

cd <wherever you told the script to run>
npm install --production --unsafe-perm node-red@next

That's it. Just let npm do it for you. One of the purposes of writing the alt. installer is to encourage folk to learn the very simple commands needed to manage things directly so that you are not beholden on other people's complex scripts. Another reason of course is so that you can have any number of versions of Node-RED installed and working in parallel.

Don't forget to change the port number though if you are already running a "live" version of Node-RED. Any unused port above 1024 should be fine, I usually just use the next free number like 1881. If you are using my settings.js file, you can set the port from an environment variable or simply change the settings file. My settings.js example file hasn't been updated for v2 though as yet and there are some new settings that you will want. Rename my template data/settings.js to something else before starting Node-RED and you should get a fresh copy. If not, the file you want is in node_modules/node-red/settings.js. Just copy that to your data folder and change as you want.

Steve-Mcl commented 3 years ago

Good info Julian, thanks.