Modified server.listen so that it works in Cloud9 or locally