2.0.0 • Published 4 years ago

quick-grpc v2.0.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
4 years ago

quick-grpc

A quick, simple gRPC loader / object maker. This module is nothing more than bubblewrap around loading and instanciating one or more .proto files in a directory.

Installation

npm install quick-grpc

Example usage

const QuickgRpc = require('quick-grpc')
const { readFileSync } = require('fs')

async function go () {
  let MyLibrary = await new QuickgRpc({
    host: 'localhost:443',
    // optional credential files, otherwise it will assign grpc.credentials.createInsecure()
    credentials: {
      root: readFileSync('ca-cert.pem'),
      priv: readFileSync('example.key'),
      chain: readFileSync('example.cert')
    },
    // the base folder to search for .proto files
    basePath: './protosDirectory',
    // camel case all gRPC method names, defaults to `true`
    camelCaseMethods: true
  })

  console.log('MyLibrary:', MyLibrary)
}

go()
2.0.0

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.0.2

5 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago