title: Running Node app via PM2 on port 80
body: <p>I have an express that I want to run on port 80. --> <code>app.listen(80);</code></p>
  
  <p>I'm using <code>PM2</code> to manage the app (restarting, stopping, monitoring, etc.) . I have a deployment shell script whose last command is <code>PM2 restart index</code>.  From the console output, I see no errors and <code>PM2</code> reports that it successfully completed the command.  Yet when I got to <code>my.ec2.ip.address:80</code> the site is not up.  Furthermore, if I run <code>node index.js</code> in my server project directory, I get a <code>Error: listen EACCES 0.0.0.0:80</code>.  This makes some sense to me as port 80 is below 1024 and therefore a privileged port.  <code>sudo node index.js</code> will allow the launch to work.  </p>
  
  <p>I'm a newbie to unix, servers, permissions, and deployment, so in addition to the solution, an explanation of the fundamental concepts contributing to my problem would be greatly appreciated.  For instance.. is it bad to simply run my node app as super-user?  Is it good practice to run <code>PM2</code> (therefore possibly running node as..?) root/super-user?  The command <code>sudo PM2 restart index</code> leads to <code>sudo: pm2: command not found</code>.  Why is <code>PM2</code> not found when running <code>sudo PM2</code>.. if <code>PM2</code> is in my path?  </p>
  
  <p>Ultimately though, when using <code>PM2</code> how can I ensure that my server runs on port 80?  not found.</p>