Skip to content

serebano/debuno-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debuno rpc

// ./api/foo.ts
export const sayHi = (name: string) => `Hello ${name}!`;
// debuno [deno/bun/node] ./server.ts

import { serve } from "jsr:@serebano/debuno-rpc/serve";

await serve({
  port: 8077,
  path: "./api",
});
// debuno [deno/bun/node] ./client.ts

import { sayHi } from "http://localhost:8077/foo.ts";

console.log(await sayHi("World"));