newclient

This commit is contained in:
Nour Alharithi
2023-10-26 08:25:17 -07:00
parent 7181912607
commit e047def3a6
4 changed files with 23 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
import { io } from 'socket.io-client';
const main = async () => {
const socket = io('http://localhost:3000');
socket.on('connect', () => {
socket.emit('subscribe', 'SOL-PERP');
});
socket.on('SOL-PERP', (data: any) => {
console.log(data);
});
};
main().then(() => {
console.log('running');
});