@alenon/grpc-mock-server
gRPC mock server written on typescript
Last updated 2 months ago by alenon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @alenon/grpc-mock-server 
SYNC missed versions from official npm registry.

grpc-mock-server

gRPC mock server for tests with typescript definitions.

NPM CI

Usage example:

private static readonly PROTO_PATH: string = __dirname + "example.proto";
private static readonly PKG_NAME: string = "com.alenon.example";
private static readonly SERVICE_NAME: string = "ExampleService";

...
    
const implementations = {
    ex1: (call: any, callback: any) => {
        const response: any =
            new this.proto.ExampleResponse.constructor({msg: "the response message"});
        callback(null, response);
    },
};

this.server.addService(PROTO_PATH, PKG_NAME, SERVICE_NAME, implementations);
this.server.start();

Current Tags

  • 1.1.8                                ...           latest (2 months ago)

1 Versions

  • 1.1.8                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (8)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |