# @imxiaomi/grpc-io

> gRPC-IO *(Development)* ====

Latest version **0.1.0-alpha.6** (published 2019-07-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install @imxiaomi/grpc-io
pnpm add @imxiaomi/grpc-io
yarn add @imxiaomi/grpc-io
bun add @imxiaomi/grpc-io
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0-alpha.6 |
| Published | 2019-07-23 |
| First published | 2019-07-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 56.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Orange Mi |
| Maintainers | orangemi |

## Links

- npm: https://www.npmjs.com/package/@imxiaomi/grpc-io
- Repository: https://github.com/orangemi/grpc-io
- Homepage: https://github.com/orangemi/grpc-io#readme
- Issues: https://github.com/orangemi/grpc-io/issues
- npm.io page: https://npm.io/package/@imxiaomi/grpc-io

## Dependencies (2)

- [grpc](https://npm.io/package/grpc.md) ^1.22.2
- [@grpc/proto-loader](https://npm.io/package/@grpc/proto-loader.md) ^0.5.1

## Recent versions

- 0.1.0-alpha.6 (latest) — 2019-07-23
- 0.1.0-alpha.5 — 2019-07-23
- 0.1.0-alpha.4 — 2019-07-23
- 0.1.0-alpha.3 — 2019-07-22
- 0.1.0-alpha.1 — 2019-07-21

## README

gRPC-IO *(Development)*
====

Use gRPC easily in node.js using [typescript](https://www.typescriptlang.org/). It support Unary2Unary, Unary2Stream, Stream2Unary, Stream2Stream all 4 type requests. Use wisely reference by [this example](./example).

This project is inspired from [grpc-kit](https://github.com/YoshiyukiKato/grpc-kit)

## Get Started
```typescript
import * as grpcIO from '@imxiaomi/grpc-io'

// Server Side
const serverBuilder = await new grpcIO.ServerBuilder('some.proto', 'package', 'service')
  .buildService()
serverBuilder.uu('someRpcMethod', async (req) => {
  return {msg: 'ok'}
})
const server = await serverBuilder.build()
await server.listen(':8443')

// Client side
const client = await new grpcIO.ClientBuilder('127.0.0.1:8443')
  .build<RouteGuide.RouteGuideService>('some.proto', 'package', 'service')
const resp = await client.someRpcMethod({})

```

## RoadMap
TODO

## About generated code
So far, this project does not use generated code for users and allow user to implement their interface to have some `friendly IDE intelligence`. But it is limited to have more `intelligence` in some case. For example, server side need to use `buildService()` promise to decide which request type the rpc method should be.

## API
TODO

## TODO
- [ ] API Documentation
- [ ] More comments
- [ ] More test

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