# apache-dubbo

> Type-safe APIs with Protobuf and TypeScript.

Latest version **0.0.10** (published 2023-08-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install apache-dubbo
pnpm add apache-dubbo
yarn add apache-dubbo
bun add apache-dubbo
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2023-08-10 |
| First published | 2023-07-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 777 |
| Maintainers | jianyi-gronk |

## Links

- npm: https://www.npmjs.com/package/apache-dubbo
- Repository: https://github.com/apache/dubbo-js
- Homepage: https://github.com/apache/dubbo-js#readme
- Issues: https://github.com/apache/dubbo-js/issues
- npm.io page: https://npm.io/package/apache-dubbo

## Recent versions

- 0.0.10 (latest) — 2023-08-10
- 0.0.4-alpha (alpha) — 2023-09-04
- 0.0.3-alpha — 2023-09-04
- 0.0.2-alpha — 2023-09-04
- 0.0.1-alpha — 2023-09-04
- 0.0.9 — 2023-08-10
- 0.0.8 — 2023-07-21
- 0.0.6 — 2023-07-21
- 0.0.5 — 2023-07-21
- 0.0.4 — 2023-07-21
- 0.0.3 — 2023-07-13
- 0.0.2 — 2023-07-06
- 0.0.1 — 2023-07-06

## README

# apache-dubbo

Dubbo is a family of libraries for building type-safe APIs with different languages and platforms.  
[apache-dubbo](https://www.npmjs.com/package/apache-dubbo) brings them to TypeScript,
the web browser, and to Node.js.


With Dubbo, you define your schema first:

```
service ElizaService {
  rpc Say(SayRequest) returns (SayResponse) {}
}
```

And with the magic of code generation, this schema produces servers and clients:

```ts
const answer = await eliza.say({sentence: "I feel happy."});
console.log(answer);
// {sentence: 'When you feel happy, what do you do?'}
```

Unlike REST, the RPCs you use with Dubbo are typesafe end to end, but they are
regular HTTP under the hood. You can see all requests in the network inspector,
and you can `curl` them if you want:

```shell
curl \
    --header 'Content-Type: application/json' \
    --data '{"sentence": "I feel happy."}' \
    https://demo.connect.build/buf.connect.demo.eliza.v1.ElizaService/Say
```

With Dubbo for ECMAScript, you can spin up a service in Node.js and call it
from the web, the terminal, or native mobile clients. Under the hood, it uses
[Protocol Buffers](https://github.com/bufbuild/protobuf-es) for the schema, and
implements RPC (remote procedure calls) with three protocols: The widely available
gRPC and gRPC-web, and Dubbo's [own protocol](https://cn.dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/),
optimized for the web. This gives you unparalleled interoperability with
full-stack type-safety.


## Get started on the web

Follow our [10 minute tutorial](https://cn.dubbo.apache.org/zh-cn/overview/quickstart/) where
we use [Vite](https://vitejs.dev/) and [React](https://reactjs.org/) to create a
web interface for ELIZA.

**React**, **Svelte**, **Vue**, **Next.js** and **Angular** are supported (see [examples](https://github.com/apache/dubbo-js/tree/dubbo3/example)).
We support all modern web browsers that implement the widely available
[fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
and the [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API).


## Get started on Node.js

Follow our [10 minute tutorial](https://cn.dubbo.apache.org/zh-cn/overview/quickstart/)
to spin up a service in Node.js, and call it from the web, and from a gRPC client
in your terminal.

You can use vanilla Node.js, or our server plugins for [Fastify](https://www.fastify.io/)
or [Express](https://expressjs.com/). We support the builtin `http`, and `http2`
modules on Node.js v16 and later.

---
_Source: https://npm.io/package/apache-dubbo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
