For a while I have been referring to this popular answer when setting up my Node.js web servers.
However, there's this one seemingly important comment that I wish to raise a question about:
If I add my Node.js start script to /etc/rc.local, won't it be executed as root on system boot? That would defeat the purpose of the port 80 redirect.
If I run the forever
package as root, does forever in turn run its processes also as root? I can't find any information regarding this point in the npm documentation. If forever does run processes as root when forever is also root, then it truly does defeat the purpose and that answer should be updated accordingly.