removing http replacement in protocol

This commit is contained in:
Absurdon 2018-11-18 21:19:19 +01:00
parent c8fb59cfcf
commit 7a8518caf6

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.hostname + ":"+ window.location.port;
const socket = io(socketUrl.replace(/^http/,'ws'));
const socket = io(socketUrl);
module.exports = function (mount) {
ReactDOM.render(<App socket={socket} />, mount);