Fixup URL to connect to.

This commit is contained in:
Nick Martin
2012-02-13 21:44:36 -08:00
parent ff25333349
commit b1d4bc85e4
2 changed files with 4 additions and 3 deletions

View File

@@ -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,

View File

@@ -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