Heroku Error during websocket handshake 503 -


i'm trying connect websockets in heroku it's saying error during websocket handshake: unexpected response code: 503. error in dev tools 'service unavailable'.

server code

var wss = new websocketserver({server: app,  port:5001}); 

client code(i replacing port 5001 well)

  var host = location.origin           .replace(/^http/, 'ws')           .replace('5000','5001');   var ws = new websocket(host); 

i've did same in development , managed connect. troubleshoot? thanks.

apparently, stupid mistake side. did follow example on here , ok..

basically, omitted part code:

// app.listen(config.port, function(){     // console.log("app started on port " + config.port); }); 

and included instead

var server = http.createserver(app); server.listen(config.port); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -