Heroku process.env.port is undefined
<p>I am trying to run a node.js app on heroku. I got it working local, but when i deploy it on heroku i get the following error:</p>

<pre><code>Error R10 (Boot timeout) -&gt; Web process failed to bind to $PORT within 60 seconds of launch
</code></pre>

<p>This is the port i try to listen to:</p>

<pre><code>const PORT = process.env.port || 3000;
</code></pre>

<p>When i logged what the process.env.port was it said process.env.port was undefined.</p>

<p>Is there anything i need to do to automatically set the port?</p>

<p>Edit (FIX):
So i found out where the problem was. The javascript was being minified, but the process.env.port was minified to something that didn't work. Thanks for the help.</p>