File size: 242 Bytes
0ee3d32
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import { io } from "socket.io-client";

// "undefined" means the URL will be computed from the `window.location` object
const URL = process.env.NEXT_PUBLIC_SOCKET_URL || undefined;

export const socket = io(URL, {
    autoConnect: false,
});