0.0.7 • Published 11 months ago

bunson v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Bunson

Bunson is a JSON-RPC 2.0 server implementation for Bun. It provides a simple way to create JSON-RPC servers with HTTP support using Bun.

Installation

$ bun add bunson

Usage

import { JsonRpcHandler, BunsonServer } from 'bunson';

const methods = {
  add: (params: { a: number, b: number }) => params.a + params.b,
  subtract: (params: { a: number, b: number }) => params.a - params.b,
};

const handler = new JsonRpcHandler({ methods });

const server = new BunsonServer(handler);
server.listen(3000);
0.0.7

11 months ago

0.0.5

11 months ago

0.0.6

11 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago