mirror of https://github.com/grpc/grpc-node.git
Merge pull request #242 from murgatroid99/new_packages_readme
Add README files for new packages
This commit is contained in:
commit
e9a7f5ae07
|
@ -21,6 +21,12 @@ This library implements the core functionality of gRPC purely in JavaScript, wit
|
||||||
|
|
||||||
## Other Packages
|
## Other Packages
|
||||||
|
|
||||||
|
### gRPC Protobuf Loader
|
||||||
|
|
||||||
|
Directory: [`packages/grpc-protobufjs`](https://github.com/grpc/grpc-node/tree/master/packages/grpc-protobufjs)
|
||||||
|
|
||||||
|
This library loads `.proto` files into objects that can be passed to the gRPC libraries.
|
||||||
|
|
||||||
### gRPC Tools
|
### gRPC Tools
|
||||||
|
|
||||||
Directory: `packages/grpc-tools`
|
Directory: `packages/grpc-tools`
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Pure JavaScript gRPC Client
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Node 9.x or greater is required.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @grpc/grpc-js
|
||||||
|
```
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Unary and streaming calls
|
||||||
|
- Cancellation
|
||||||
|
- Deadlines
|
||||||
|
- TLS channel credentials
|
||||||
|
- Call credentials (for auth)
|
||||||
|
- Simple reconnection
|
||||||
|
|
||||||
|
This library does not directly handle `.proto` files. To use `.proto` files with this library we recommend using the `@grpc/proto-loader` package.
|
|
@ -0,0 +1,19 @@
|
||||||
|
# gRPC Protobuf Loader
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install @grpc/proto-loader
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
const protoLoader = require('@grpc/proto-loader');
|
||||||
|
const grpcLibrary = require('grpc');
|
||||||
|
// OR
|
||||||
|
const grpcLibrary = require('@grpc/grpc-js');
|
||||||
|
protoLoader.load(protoFile, options).then(packageDefinition => {
|
||||||
|
const package = grpcLibrary.loadPackageDefinition(packageDefinition);
|
||||||
|
});
|
||||||
|
```
|
Loading…
Reference in New Issue