diegopamio / angular-sails-bind

An angular service to bind scope models to sailsjs models thru socket
MIT License
136 stars 25 forks source link

Connect on a different url? #34

Open misterch0c opened 9 years ago

misterch0c commented 9 years ago

I have an angularjs app running on port 3131. This is what I get in the console.

GET XHR http://127.0.0.1:3131/socket.io/ [HTTP/1.1 404 Not Found 2ms]
"
        Socket is trying to reconnect to Sails...
_-|>_-  (attempt #4)

"

So I've tried to change the url but the output stayed the same

io.sails.url = 'http://localhost:1337'; 

Is there a way to achieve this?

Thank you

aklinkert commented 8 years ago

Yep, that's an issue with autoConnect. Try to diable it: https://github.com/balderdashy/sails.io.js#disable-autoconnect-andor-connect-sockets-manually