Skip to content

BalliAsghar/grpc-typescript-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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