Changing socket-protocol to ws(s) instead of http(s)

This commit is contained in:
Absurdon 2018-11-18 20:09:48 +01:00
parent 1de9c655c5
commit 60653e12af

View file

@ -3,7 +3,7 @@ const ReactDOM = require("react-dom");
const App = require("javascripts/components/main");
const io = require("socket.io-client");
const socketUrl = window.location.protocol + "//" + window.location.host;
const socket = io(socketUrl);
const socket = io(socketUrl.replace(/^http/,'ws'));
module.exports = function (mount) {
ReactDOM.render(<App socket={socket} />, mount);