I used pm2 and forever modules to run my node js applications without end. Everything worked great, however as soon as I implemented HTTPS - port 443 - into my node app, I now have to run my in the following way - sudo node app.js
If I run it without sudo, so just node app.js
alone, I get the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:904:11)
So I tried to implement forever into the sudo command, which would look like this:
sudo forever start app.js
However I get an error back:
sudo: forever: command not found
And when I try to run just:
forever start app.js
I get the same error as above (EACCES
). I understand why this error appears, because its a port below 1000, but is there a way to run this node application on forever or something similar?
Any idea on how to solve this? Any help would be appreciated.