Skip to content

Instantly share code, notes, and snippets.

@iambrian
Created April 10, 2016 15:50
Show Gist options
  • Save iambrian/5a18282e4d94592157b2c20801dfa424 to your computer and use it in GitHub Desktop.
Save iambrian/5a18282e4d94592157b2c20801dfa424 to your computer and use it in GitHub Desktop.
Heroku H10 Error
// port needs to be set via the process.env.PORT otherwise results in port binding error
var express = require('express');
var app = express();
...
app.set('port', (process.env.PORT || 5000));
...
http.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment