Socket
Socket
Sign inDemoInstall

grpc-promisify

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-promisify


Version published
Maintainers
1
Created

Readme

Source

grpc-promisify

gRPC is a high performance, open source, general-purpose RPC framework, grpc-promisify make gRPC client promisify in node.

Installation

$ npm install grpc-promisify

##The Gist

const PROTO_PATH = __dirname + '/hello.proto';
const promisify = require('grpc-promisify');
const grpc = require('grpc');
const hello_proto = grpc.load(PROTO_PATH).helloworld;

function main() {
  const client = new hello_proto.Greeter('localhost:50051', grpc.credentials.createInsecure());
  const user = 'hello';
  
  promisify(client);
  client.sayHello({name: user})
  .then(res => console.log(res.message))
  .catch(err => console.error(err));
}

main();

License

The MIT license.

Keywords

FAQs

Last updated on 01 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc