Hi, I'm under windows, under "C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red" I've changed on both files:
on red.js settings.uiPort = 80;
and on settings.js uiPort: process.env.PORT || 80
I've restarted NR and keeps run on 1880, should I restart nodejs too? It means restart PC I suppose.
Why it doesn't change?
When you run node-red in a command window it should tell you which settings.js it is using. That is the one you have to change.
Generally, you cannot use ports <1024 without running with administrative privileges which opens up other issues and is best not done.
If you wish to hide the Node-RED port from users:
- You probably shouldn't be using HTTP but rather HTTPS (port 443 by default).
- You are generally better off using a reverse proxy. IIS can provide that on Windows or you can install NGINX or similar.
The real question is - what are you trying to achieve by removing the port number?
that is the node-red source code. You dont edit that.
You will have a .node-red folder likely in c:\users\Admin\.node-red
In there will be a settings.js file where you can change things.
Alternatively, start node-red with a command line option:
node-red -p 80
See all options here: Running Node-RED locally : Node-RED
To second what Julian said, what is the goal? To have a prettier URL?
thank you mates, sorry for silly question, I've just found a copy of file and I couldn't imagine the main was on another path. Yes the command windows should tell which file is in use, I'll be more careful in future