0.0.10 • Published 8 months ago

apache-dubbo-web v0.0.10

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

apache-dubbo-web

Dubbo is a family of libraries for building and consuming APIs on different languages and platforms. apache-dubbo brings type-safe APIs with Protobuf to TypeScript.

apache-dubbo-web provides the following adapters for web browsers, and any other platform that has the fetch API on board:

createDubboTransport()

Lets your clients running in the web browser talk to a server with the Dubbo protocol:

import { createPromiseClient } from "apache-dubbo";
+ import { createDubboTransport } from "apache-dubbo-web";
import { ElizaService } from "./gen/eliza_dubbo.js";

+ // A transport for clients using the Dubbo protocol with fetch()
+ const transport = createDubboTransport({
+   baseUrl: "https://demo.connect.build",
+ });

const client = createPromiseClient(ElizaService, transport);
const { sentence } = await client.say({ sentence: "I feel happy." });
console.log(sentence) // you said: I feel happy.

createGrpcWebTransport()

Lets your clients running in the web browser talk to a server with the gRPC-web protocol:

import { createPromiseClient } from "apache-dubbo";
+ import { createGrpcWebTransport } from "apache-dubbo-web";
import { ElizaService } from "./gen/eliza_dubbo.js";

+ // A transport for clients using the Dubbo protocol with fetch()
+ const transport = createGrpcWebTransport({
+   baseUrl: "https://demo.connect.build",
+ });

const client = createPromiseClient(ElizaService, transport);
const { sentence } = await client.say({ sentence: "I feel happy." });
console.log(sentence) // you said: I feel happy.

Getting started

To get started with Dubbo, head over to the docs for a tutorial, or take a look at our example.

Dubbo plays nice with Vue, Svelte, Remix, Next.js, Angular and many others. Take a look at our examples for various frameworks.

0.0.4-alpha

8 months ago

0.0.3-alpha

8 months ago

0.0.1-alpha

8 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago