Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-promisify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-promisify

Make gRPC client promisify

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
455
increased by35.82%
Maintainers
1
Weekly downloads
 
Created
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

Package 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc