mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-02-17 01:12:20 +00:00
Changing socket-protocol to ws(s) instead of http(s)
This commit is contained in:
parent
1de9c655c5
commit
60653e12af
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ const ReactDOM = require("react-dom");
|
||||||
const App = require("javascripts/components/main");
|
const App = require("javascripts/components/main");
|
||||||
const io = require("socket.io-client");
|
const io = require("socket.io-client");
|
||||||
const socketUrl = window.location.protocol + "//" + window.location.host;
|
const socketUrl = window.location.protocol + "//" + window.location.host;
|
||||||
const socket = io(socketUrl);
|
const socket = io(socketUrl.replace(/^http/,'ws'));
|
||||||
|
|
||||||
module.exports = function (mount) {
|
module.exports = function (mount) {
|
||||||
ReactDOM.render(<App socket={socket} />, mount);
|
ReactDOM.render(<App socket={socket} />, mount);
|
||||||
|
|
Loading…
Reference in a new issue