title: How to set port for express server dynamically?
body: <h2>This is the question mostly asked by the beginners, as I had this question when I was starting out</h2>
  <p><em>How to set port for <strong>express</strong> without needing to hardcode or even choose port yourself?</em> This is the question I had when I was starting out in node and express (I am still a beginner, have lots of things to learn). Things I wanted know other than that included,</p>
  <ul>
  <li>What is <strong>difference between</strong> using <code>app.set('port', portNum)</code> and directly using port number in <code>app.listen(portNum)</code>?</li>
  </ul>