Next Phenomenal Microbrewery

    grpc-web-proxy

    0.0.3 • Public • Published

    grpc-web-proxy

    A web ui for interacting with gRPC services

    Installation

    npm i -g grpc-web-proxy
    

    Usage

    Startup

    grpc-web-proxy
    

    Will start the proxy on default port 8080

    Execute with ---port <port> or -p <port> command line argument to start on a custom port.

    grpc-web-proxy --port 8082
    

    Requests

    The gRPC proxy can be used with API testing tools like Postman.

    connect to gRPC service

    POST 0.0.0.0:<port>/connect
    

    with JSON body:

    {
      "address": "<gRPC service address>:<gRPC service port>",
      "pathToProtoFile": "<absolute path to gRPC service definition proto file>",
      "servicePath": "[<package name>.]<service name>"
    }
    

    Creates gRPC client and responds with service info.

    get connection info

    GET 0.0.0.0:<port>/connection
    

    Responds with service info if connection is established.

    execute gRPC procedure

    POST 0.0.0.0:<port>/execute
    

    with JSON body:

    {
        "methodName": "<method name>",
      "params": {
        // method params
      }
    }
    

    disconnect from gRPC service

    POST 0.0.0.0:<port>/disconnect
    

    Destroys gRPC client.

    Web UI

    WIP. Not available yet.

    Install

    npm i grpc-web-proxy

    DownloadsWeekly Downloads

    9

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    24.1 kB

    Total Files

    19

    Last publish

    Collaborators

    • antonrublev