mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
15 lines
311 B
TypeScript
15 lines
311 B
TypeScript
import { io } from 'socket.io-client';
|
|
|
|
const URL =
|
|
import.meta.env.VITE_WS_MODE === 'development'
|
|
? 'http://localhost:3001'
|
|
: 'https://stacjownik.spythere.eu';
|
|
|
|
const socket = io(URL, {
|
|
transports: ['websocket', 'polling'],
|
|
rememberUpgrade: true,
|
|
reconnection: true
|
|
});
|
|
|
|
export default socket;
|