× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Deploying Node.js app on Heroku

<p>Make sure you have the <strong>Procfile </strong>file like this:</p> <p> </p> <pre><code>web: node my-script.js</code></pre> <p> </p> <p>Also in the script use:</p> <p> </p> <pre><code class="language-javascript">... var port = process.env.PORT || 9000; ... server.listen(port);</code></pre> <p>Doing so, you make sure you listen on Heroku's port.</p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus