项目作者: CatsMiaow

项目描述 :
Node.js gRPC Structure for TypeScript Example
高级语言: TypeScript
项目地址: git://github.com/CatsMiaow/node-grpc-typescript.git
创建时间: 2018-12-13T10:23:19Z
项目社区:https://github.com/CatsMiaow/node-grpc-typescript

开源协议:MIT License

下载


node-grpc-typescript

Node.js gRPC structure with google.protobuf for TypeScript example

Installation

  1. npm ci

Build

  1. # exports to *.proto to *.ts
  2. npm run build
  3. npm run lint

Server Start

  1. npm start #= node dist/server

Client Test

Start the server before testing client commands.

  1. # 1. Request
  2. npm run client #= node dist/client
  3. # 2. with Parameter
  4. npm run client blahblahblah
  5. # 3. Error
  6. npm run client error
  7. # 4. Stream
  8. npm run client stream
  9. # 5. Health Check
  10. npm run health

Documentation