/grpc-typescript-example

gRPC/Typescript example with Redis

Primary LanguageTypeScript

gRPC/Typescript example

This is a simple example of a gRPC server, written in Typescript, using:

How to run

Server

git clone https://github.com/BalliAsghar/grpc-typescript-example
cd grpc-typescript-example

Install dependencies

npm install

Compile the proto file

npm run build:proto

Make sure you have the protoc installed on your machine.

Run the server

npm run dev

Make sure you have the Redis installed on your machine.

Test the server

Use Postman or any other tool to test the server.

Available RPCs

  • CreateProduct - Creates a new product
  • GetProduct - Gets a product by id
  • GetProducts - Gets all products