Make hosts like heroku recognise $port

The above command line 'var port = process.env.PORT || 8000;', makes heroku to respond or it just returns with a timeout.
Source: me and my foolish dream of making a server ;p