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

@crayond_dev/grpc-toolkit

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crayond_dev/grpc-toolkit

This has definitions and types required for implementing gRPC in toolkit microservices


Version published
Maintainers
0
Created

@crayond_dev/grpc-toolkit

npm version npm downloads license

Description

@crayond_dev/grpc-toolkit is a toolkit for simplifying gRPC client and server setup in Node.js applications. It provides utilities and helper functions to streamline the development of gRPC-based microservices.

Features

  • Easily create gRPC clients and servers.
  • Simplified gRPC method implementation.
  • Helper functions for common gRPC tasks.
  • Extensive documentation and examples.

Installation

You can install the package using npm or yarn:

npm install @crayond_dev/grpc-toolkit
# or
yarn add @crayond_dev/grpc-toolkit

Creating gRPC server

import { GRPCServer } from "@crayond_dev/grpc-toolkit";
const grpcServer: GRPCServer = new GRPCServer();

// append service handlers grpcServer.appendServices(service, pasmHandlerFunction)

grpcServer.listen();

Creating gRPC client

const client = new proto.service(
  "localhost:50051",
  grpc.credentials.createInsecure()
);

client.serviceFn({ foo: boo }, (error, response) => {
  if (error) console.log(error);
  console.log(response);
});

FAQs

Package last updated on 30 Jul 2024

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