Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stepci/cool-grpc
Make gRPC cool again!
https://github.com/stepci/cool-grpc
grpc grpc-client
Last synced: about 2 months ago
JSON representation
Make gRPC cool again!
- Host: GitHub
- URL: https://github.com/stepci/cool-grpc
- Owner: stepci
- License: mit
- Created: 2022-10-15T13:02:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T11:21:23.000Z (6 months ago)
- Last Synced: 2024-11-05T23:49:22.515Z (about 2 months ago)
- Topics: grpc, grpc-client
- Language: TypeScript
- Homepage: https://stepci.com
- Size: 123 KB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cool-grpc
Simple, stupid gRPC client for Node written in Typescript
## Features
- Easy to use (inspired by `fetch` and `got`)
- Loading multiple .proto files
- Automatic message encoding/decoding
- Unary calls
- Client streaming
- Server streaming
- Hooks## Get Started
```
npm i cool-grpc
``````js
import { makeRequest } from 'cool-grpc'const protos = ['./helloworld.proto']
makeRequest(protos, {
host: '0.0.0.0:50051',
service: 'helloworld.Greeter',
method: 'SayHello',
metadata: {},
data: {
name: 'world'
},
tls: {
rootCerts: "",
privateKey: "",
certChain: ""
},
beforeRequest: (req) => {},
afterResponse: (res) => {}
})
.then(console.log)
.catch(console.error)
```