Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpServer accessable #148

Merged
merged 1 commit into from
Jan 29, 2014
Merged

httpServer accessable #148

merged 1 commit into from
Jan 29, 2014

Conversation

TheBenji
Copy link
Contributor

Not sure that you guys already talked about it or want this stuff but it seems like it is impossible at the moment to hook something like socket.io up.

With this small commit the server is accessible and it's easy to hook something like socket.io in the callback up.

@JedWatson
Copy link
Member

This is a good idea, cheers.

JedWatson added a commit that referenced this pull request Jan 29, 2014
@JedWatson JedWatson merged commit 2e67493 into keystonejs:master Jan 29, 2014
@bladey
Copy link
Contributor

bladey commented Feb 2, 2014

@JedWatson This is causing a real issue deploying to Heroku servers that took awhile to track down.

An ambiguous error of:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

Is occurring after you deploy to Heroku. This is NOT related to Heroku attempting to run on port 3000, it's been assigned Heroku's default random port correctly.

Comparing the lines:

A. http.createServer(app).listen(app.get('port'), function() {
B. http.createServer(app).listen(app.get('port'), app.get('host'), function() {

With B being the latest code, there doesn't appear to be a default 'host', thus falls back to 127.0.0.1 which seems invalid for Heroku.

Falling back to code A, the app runs on Heroku flawlessly.

What is 'host' supposed to be for a Heroku style setup?

Tom

@TheBenji
Copy link
Contributor Author

TheBenji commented Feb 2, 2014

Not sure that this is about that one but try to set your ENV-variable "IP" to "0.0.0.0"

@bladey
Copy link
Contributor

bladey commented Feb 2, 2014

Setting the env of IP to 0.0.0.0 on Heroku fixes the issue, thanks @TheBenji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants