Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't connect with custom host/port #15

Closed
seanrucker opened this Issue Jul 5, 2011 · 7 comments

Comments

Projects
None yet
3 participants

I installed Juggernaut on Heroku using this Gist:

https://gist.github.com/1003748

Now I'm trying to test out connecting to it from my local webserver.

var jug = new Juggernaut({
    host: 'mywebapp.herokuapp.com',
    port: 80
});

console.log(jug.options.host); // mywebapp.herokuapp.com
console.log(jug.options.port); // 80

jug.on('connect', function() { 
    console.log('connect');
});

jug.on('disconnect', function() { 
    console.log('disconnect');
});

jug.subscribe('channel1', function(data) {
    console.log("Got data: " + data); 
});

This produces an error:

Invalid url for WebSocket ws://[object Object]:5000/socket.io/websocket

It seems to be using my local port and the host is an object?

Owner

maccman commented Jul 5, 2011

This ticket should really be on Juggernaut's tracker. Anyway, can you
confirm you're using the latest juggernaut.js file from the github repo.

On Tue, Jul 5, 2011 at 11:24 AM, seanrucker <
reply@reply.github.com>wrote:

I installed Juggernaut on Heroku using this Gist:

https://gist.github.com/1003748

Now I'm trying to test out connecting to it from my local webserver.

var jug = new Juggernaut({
host: 'mywebapp.herokuapp.com',
port: 80
});

console.log(jug.options.host); // mywebapp.herokuapp.com
console.log(jug.options.port); // 80

jug.on('connect', function() {
console.log('connect');
});

jug.on('disconnect', function() {
console.log('disconnect');
});

jug.subscribe('channel1', function(data) {
console.log("Got data: " + data);
});

This produces an error:

Invalid url for WebSocket ws://[object Object]:5000/socket.io/websocket

It seems to be using my local port and the host is an object?

Reply to this email directly or view it on GitHub:
#15

Alex MacCaw

+12147175129
@maccman

http://alexmaccaw.co.uk | http://www.leadthinking.com | http://socialmod.com

Oops, didn't realize I was on the holla repo.

I dit a git clone from git://github.com/maccman/juggernaut.git as per the Gist this morning so it should be the latest.

Is it juggernaut.js I'm supposed to be using? I am using application.js.

<script type="text/javascript" src="http://mywebapp.herokuapp.com/application.js"></script>

I am seeing this error in the JS console on line 790 of application.js

SYNTAX_ERR: DOM Exception 12: An invalid or illegal string was specified.

I am also seeing the same issue, were you able to solve this

No I wasn't... :(

Hoping maccman will help out. Should we move this to Juggernaut's issue tracker to get some more traction?

Owner

maccman commented Jul 12, 2011

Yup - that would be great. Thanks.

On Tue, Jul 12, 2011 at 9:42 AM, seanrucker <
reply@reply.github.com>wrote:

No I wasn't... :(

Hoping maccman will help out. Should we move this to Juggernaut's issue
tracker to get some more traction?

Reply to this email directly or view it on GitHub:
#15 (comment)

Alex MacCaw

+12147175129
@maccman

http://alexmaccaw.co.uk | http://www.leadthinking.com | http://socialmod.com

Moved to Juggernaut's issue tracker.

maccman/juggernaut#87

@seanrucker seanrucker closed this Jul 12, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment