Semaphore/web/src/socket.js
2022-10-29 18:37:20 +05:00

9 lines
195 B
JavaScript

import Socket from '@/lib/Socket';
const socket = new Socket(() => {
const baseURI = `ws${document.baseURI.substr(4)}`;
return new WebSocket(`${baseURI}api/ws`);
});
export default socket;