diff --git a/lib/react/app.jsx b/lib/react/app.jsx index 5b7ba48..4e14c19 100644 --- a/lib/react/app.jsx +++ b/lib/react/app.jsx @@ -222,7 +222,8 @@ var MessageBar = React.createClass({ var socket; function initialiseComponents () { - socket = io("http://localhost:8000/") + var socketUrl = window.location.protocol + "//" + window.location.host; + socket = io(socketUrl) .on("connect", function () { console.log("Connected"); }) diff --git a/public/js/app.js b/public/js/app.js index f2b9c50..a112169 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -222,7 +222,8 @@ var MessageBar = React.createClass({displayName: "MessageBar", var socket; function initialiseComponents () { - socket = io("http://localhost:8000/") + var socketUrl = window.location.protocol + "//" + window.location.host; + socket = io(socketUrl) .on("connect", function () { console.log("Connected"); }) @@ -243,3 +244,5 @@ initialiseComponents(); }); + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmb3JtZWQuanMiLCJzb3VyY2VzIjpbbnVsbF0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLENBQUMsQ0FBQyxZQUFZOztBQUVkLFlBQVksQ0FBQzs7QUFFYixJQUFJLG1DQUFtQyw2QkFBQTtDQUN0QyxNQUFNLEVBQUUsWUFBWTtFQUNuQjtHQUNDLG9CQUFBLElBQUcsRUFBQSxJQUFDLEVBQUE7SUFDSCxvQkFBQSxHQUFFLEVBQUEsQ0FBQSxDQUFDLElBQUEsRUFBSSxDQUFDLEdBQUksQ0FBQSxFQUFBO0tBQ1gsb0JBQUEsR0FBRSxFQUFBLENBQUEsQ0FBQyxTQUFBLEVBQVMsQ0FBQyxtQkFBb0IsQ0FBSSxDQUFBLEVBQUEsWUFBQSxFQUFBLENBQUE7QUFBQSxLQUNyQyxvQkFBQSxNQUFLLEVBQUEsQ0FBQSxDQUFDLFNBQUEsRUFBUyxDQUFDLGdCQUFpQixDQUFBLEVBQUEsR0FBQSxFQUFFLElBQUksQ0FBQyxLQUFLLENBQUMsS0FBSyxFQUFDLEd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