2024-05-08 21:02:31 +00:00
|
|
|
import { io } from 'socket.io-client';
|
|
|
|
|
|
|
|
// "undefined" means the URL will be computed from the `window.location` object
|
|
|
|
const URL = process.env.REACT_APP_BACKEND_URL
|
|
|
|
|
2024-08-29 21:09:00 +00:00
|
|
|
export const socket = io(URL,
|
|
|
|
//{
|
|
|
|
// withCredentials: true,
|
|
|
|
// extraHeaders: {
|
|
|
|
// "my-custom-header": "abcd"
|
|
|
|
// },
|
2024-05-20 13:00:45 +00:00
|
|
|
// transports: ['websocket', 'polling']
|
2024-08-29 21:09:00 +00:00
|
|
|
//}
|
|
|
|
);
|