mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
adding socket.js for creating websocket connections
This commit is contained in:
parent
919f83c77e
commit
c2845a0419
6
frontend/src/socket.ts
Normal file
6
frontend/src/socket.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { io } from 'socket.io-client';
|
||||||
|
|
||||||
|
const URL = 'ws://localhost:8001/';
|
||||||
|
// process.env.NODE_ENV === 'production' ? undefined : 'ws://localhost:8001/ws';
|
||||||
|
|
||||||
|
export const socket = io(URL, { path: '/ws/socket.io', transports: ['websocket'] });
|
Loading…
x
Reference in New Issue
Block a user