UNPKG

fsf

Version:

A typesafe websocket RPC library which thins the borders between clients and servers.

16 lines (11 loc) 364 B
import { Client } from "../../src/index"; import { API } from "../api"; const client = Client<API>("http://localhost:8080"); const { listFiles, searchMovie } = client; const main = async () => { console.log(await client.hello()); console.log(await client.sum(12, 20)); console.log(await listFiles()); console.log(await searchMovie("kong")); }; main();