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
Post a Comment