hardlounge/client/js/socket.js
2019-11-25 20:13:12 +02:00

13 lines
287 B
JavaScript

"use strict";
import io from "socket.io-client";
const socket = io({
transports: JSON.parse(document.body.dataset.transports),
path: window.location.pathname + "socket.io/",
autoConnect: false,
reconnection: !document.body.classList.contains("public"),
});
export default socket;