{"action":"created","issue":{"url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/51","labels_url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/51/comments","events_url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/51/events","html_url":"https://github.com/oortcloud/node-ddp-client/pull/51","id":56377302,"number":51,"title":"SockJs info support","user":{"login":"arunoda","id":50838,"avatar_url":"https://avatars.githubusercontent.com/u/50838?v=3","gravatar_id":"","url":"https://api.github.com/users/arunoda","html_url":"https://github.com/arunoda","followers_url":"https://api.github.com/users/arunoda/followers","following_url":"https://api.github.com/users/arunoda/following{/other_user}","gists_url":"https://api.github.com/users/arunoda/gists{/gist_id}","starred_url":"https://api.github.com/users/arunoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunoda/subscriptions","organizations_url":"https://api.github.com/users/arunoda/orgs","repos_url":"https://api.github.com/users/arunoda/repos","events_url":"https://api.github.com/users/arunoda/events{/privacy}","received_events_url":"https://api.github.com/users/arunoda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-03T13:28:46Z","updated_at":"2015-02-04T01:30:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/oortcloud/node-ddp-client/pulls/51","html_url":"https://github.com/oortcloud/node-ddp-client/pull/51","diff_url":"https://github.com/oortcloud/node-ddp-client/pull/51.diff","patch_url":"https://github.com/oortcloud/node-ddp-client/pull/51.patch"},"body":"This PR added basic SockJs support. Actually, this still uses WebSockets.\r\nBut this allows to hit the /sockjs/info first and try to support `base_url` property if it's there.\r\n\r\nWith this, we can use this with meteorhacks:cluster where it supports load balancing and service discovery. These features now available with this PR.\r\n\r\n**This PR is backward compatible**\r\n\r\nWe need to add `useSockJs` option to turn on sockjs support.\r\n\r\n~~~js\r\nvar client = new DDPClient({ useSockJs: true });\r\n~~~\r\n\r\nAdditionally, now we don't set the path as \"websocket\" by default. Instead it'll be set when the websocket URL is generating. `meteorhacks:cluster` uses path to discover services when enabled sockjs mode. So, that's the reason we keep path option empty if it is.\r\n\r\nI'll be great, if you can have this PR :)"},"comment":{"url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/comments/72773447","html_url":"https://github.com/oortcloud/node-ddp-client/pull/51#issuecomment-72773447","issue_url":"https://api.github.com/repos/oortcloud/node-ddp-client/issues/51","id":72773447,"user":{"login":"emgee3","id":871917,"avatar_url":"https://avatars.githubusercontent.com/u/871917?v=3","gravatar_id":"","url":"https://api.github.com/users/emgee3","html_url":"https://github.com/emgee3","followers_url":"https://api.github.com/users/emgee3/followers","following_url":"https://api.github.com/users/emgee3/following{/other_user}","gists_url":"https://api.github.com/users/emgee3/gists{/gist_id}","starred_url":"https://api.github.com/users/emgee3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emgee3/subscriptions","organizations_url":"https://api.github.com/users/emgee3/orgs","repos_url":"https://api.github.com/users/emgee3/repos","events_url":"https://api.github.com/users/emgee3/events{/privacy}","received_events_url":"https://api.github.com/users/emgee3/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T01:30:09Z","updated_at":"2015-02-04T01:30:09Z","body":"@arunoda, this looks good and I'm fine on merging this, but I'd like a few changes first:\r\n\r\n- Update the `README.markdown` and `examples/example.js` to show it's use\r\n- Update `CHANGELOG.md` – I'll release as 0.10.0\r\n- Minor style note: `if (true) {` rather than `if(true) {`\r\n- Can you rebase against master \r\n"}}