I am trying to install Node-red on Linux machine under specific user and inside some folder. But by default node-red is getting installed under user home directory. Is there a way to give path while installing node-red modules?
Below are the steps followed to install Node-red Module.
Step 1 : Log in to Linux machine as user(not root user)
Step 2: Install node JS under some specific folder(ex: /opt/nodejs)
Step 3 : install node-red using below command
npm install -g --unsafe-perm node-red
Above step install node-red under user home directory. For example, suppose if I have logged in as ankuser then .nodered folder gets created under /home/ankuser/.nodered.
But in my case i want to install node-red under "/opt/nodered" path.
How can i do this? can any one suggest me the command to be used to install the same.
Thanks and Regards,