# Hproxy Roll Dice gRPC Service **Repository Path**: cuigray/hproxy-roll-dice-grpc-service ## Basic Information - **Project Name**: Hproxy Roll Dice gRPC Service - **Description**: haproxy 提供的 gRPC 测试服务,包含客户端和服务端。提供了 Dockerfile 。https://www.compilenrun.com/docs/middleware/nginx/nginx-reverse-proxy/nginx-grpc-proxying/ - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.haproxy.com/documentation/haproxy-configuration-tutorials/protocol-support/grpc/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-19 - **Last Updated**: 2025-11-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RollDiceService gRPC Example An example gRPC client and server. 1. Build the client and server applications: ``` sudo docker build -t haproxy/rolldice-client -f Dockerfile.client . sudo docker build -t haproxy/rolldice-server -f Dockerfile.server . ``` 2. Copy the **client** and **server** binaries to your host computer: ``` sudo docker create -it --name client nramirez/rolldice-client bash sudo docker cp client:/app/client ./ sudo docker rm -f client sudo docker create -it --name server nramirez/rolldice-server bash sudo docker cp server:/app/server ./ sudo docker rm -f server ``` 3. Start the server: ``` SERVER_ADDRESS=:3000 ./server ``` 4. Start the client. It sends a request to the server every other second: ``` SERVER_ADDRESS=localhost:3000 NUMBER_OF_DICE=2 ./client ```