test / gameserv /src /client.ts
dcrey7's picture
Upload 522 files
811126d verified
raw
history blame
258 Bytes
import { io } from "socket.io-client";
const socket = io("http://localhost:5001");
socket.on("connect", () => {
console.log("connected to server");
socket.emit("message", "Hello from client");
});
socket.on("foo", (data) => {
console.log(data);
});