socket.js 270 B

1234567
  1. import io from "socket.io-client";
  2. const socket_location = `${process.env.PUBLIC_URL}/socket.io`;
  3. const socket = io(window.location.origin, { path: socket_location });
  4. console.log(`socket location: ${window.location.origin + socket_location}`);
  5. export default socket;