WhisperNet / lib /socket.ts
bonesmasher's picture
Update lib/socket.ts
0ee3d32 verified
raw
history blame contribute delete
242 Bytes
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,
});