diff --git a/packages/livedata/livedata_client.js b/packages/livedata/livedata_client.js index 38022cee13..0c994ec495 100644 --- a/packages/livedata/livedata_client.js +++ b/packages/livedata/livedata_client.js @@ -406,7 +406,9 @@ _.extend(Meteor._Collection.prototype, { } }); -App = new Meteor.Server('/'); +// Path matches sockjs 'prefix' in stream_server. We should revisit this +// once we specify the 'on the wire' aspects of livedata more clearly. +App = new Meteor.Server('/sockjs'); _.extend(Meteor, { is_server: false, diff --git a/packages/stream/stream_client.js b/packages/stream/stream_client.js index 706d6abdeb..b793200c97 100644 --- a/packages/stream/stream_client.js +++ b/packages/stream/stream_client.js @@ -226,8 +226,7 @@ _.extend(Meteor._Stream.prototype, { var self = this; self._cleanup_socket(); // cleanup the old socket, if there was one. - // XXX URL! - self.socket = new SockJS('http://localhost:3000/sockjs', undefined, {debug: false}); + self.socket = new SockJS(self.url, undefined, {debug: false}); self.socket.onmessage = function (data) { // first message we get when we're connecting goes to _connected, // which connects us. All subsequent messages (while connected) go to