hardlounge/client/js/socket.js

13 lines
294 B
JavaScript
Raw Normal View History

2017-04-18 07:31:46 +00:00
"use strict";
const io = require("socket.io-client");
const socket = io({
transports: JSON.parse(document.body.dataset.transports),
path: window.location.pathname + "socket.io/",
2017-04-18 07:31:46 +00:00
autoConnect: false,
reconnection: !document.body.classList.contains("public"),
2017-04-18 07:31:46 +00:00
});
2018-07-08 17:53:23 +00:00
module.exports = socket;