Hello,

I am using grunt server to run my angularjs application.

I am trying to implement a chat functionality ( it's actually my first time 
doing this ) using
*socket.io-client* ( I included socket.io-client using bower; *bower 
install socket.io-client --save*).

I ran a small test code which works fine ( assume node.js is running on 
8080 )

*function MyController( $scope ){*

*  var socket = io.connect('http://localhost:8080');*
*  socket.on('connect', function(){*

*   alert('connection established');*

*  })*
*}*


However, when I try to connect to my api server, it shows a weird 
behaviour, which turns into an error

...
* var socket = io.connect('https://path-to-my-api-server');*
...

results in 
GET 
https://path-to-my-server:*9000*/socket.io/1/?t=1391815120372<https://sleepy-shore-1958.herokuapp.com:9000/socket.io/1/?t=1391815120372>net::ERR_CONNECTION_REFUSED
 ( 
in Chrome )

Please, take a notice at the *:9000* attached at the end of the 
*https://path-to-my-api-server*. I highly suspect this is ruining my 
connection attempts, but
so far I haven't found a way to prevent the :9000 being attached 
automatically to my api url.

Thanks



-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to