title: Custom Port not working for node.js app on AWS EC2 instance
body: <p>I have deployed the following code on my AWS EC2 instance -</p>
  
  <pre><code>const express = require('express')
  const app = express()
  app.get('/test',(req,res) =&gt; {res.send('Hi')})
  
  app.listen(3001, () =&gt; console.log('Server running on port 80'))
  </code></pre>
  
  <p>When I try to visit the following url - <a href="http://ec2-13-59-209-0.us-east-2.compute.amazonaws.com/test" rel="nofollow noreferrer">http://ec2-13-59-209-0.us-east-2.compute.amazonaws.com/test</a>  , I get connection refused message. The message on the UI is ec2-13-59-209-0.us-east-2.compute.amazonaws.com refused to connect.</p>
  
  <p>I did go through the documentation and set up security group to listen on port 3001. But that did not help either.So I enabled on traffic for all the ports. Still I was not able to connect. Please find below snapshot of the security group. It would be great if you can help me with this.</p>
  
  <p><a href="https://i.stack.imgur.com/xhyyQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xhyyQ.png" alt="enter image description here"></a></p>