Created
April 10, 2016 15:50
-
-
Save iambrian/5a18282e4d94592157b2c20801dfa424 to your computer and use it in GitHub Desktop.
Heroku H10 Error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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