{"id":16278385,"url":"https://github.com/gbaptista/grpc-demos","last_synced_at":"2026-04-04T22:34:30.746Z","repository":{"id":149073575,"uuid":"160104877","full_name":"gbaptista/grpc-demos","owner":"gbaptista","description":"Examples of gRPC server and clients (Go, Ruby and Javascript).","archived":false,"fork":false,"pushed_at":"2018-12-03T17:50:13.000Z","size":72,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-03T19:31:01.156Z","etag":null,"topics":["envoy","go","golang","grpc","javascript","react","ruby"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbaptista.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-02T23:00:42.000Z","updated_at":"2024-11-28T08:57:53.000Z","dependencies_parsed_at":"2023-07-14T06:02:09.986Z","dependency_job_id":null,"html_url":"https://github.com/gbaptista/grpc-demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gbaptista/grpc-demos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaptista%2Fgrpc-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaptista%2Fgrpc-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaptista%2Fgrpc-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaptista%2Fgrpc-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbaptista","download_url":"https://codeload.github.com/gbaptista/grpc-demos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaptista%2Fgrpc-demos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["envoy","go","golang","grpc","javascript","react","ruby"],"created_at":"2024-10-10T18:58:19.824Z","updated_at":"2026-04-04T22:34:30.722Z","avatar_url":"https://github.com/gbaptista.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC Demos\n\n- [Proto](#proto)\n- [Go Server](#go-server)\n- [Go Client](#go-client)\n- [Ruby Client](#ruby-client)\n- [Javascript Web Client](#javascript-web-client)\n\n## Proto\n```proto\nsyntax = \"proto3\";\n\npackage hello;\n\nservice HelloService {\n  rpc SayHello (HelloRequest) returns (HelloReply);\n}\n\nmessage HelloRequest {\n  string name = 1;\n}\n\nmessage HelloReply {\n  string message = 1;\n}\n```\n\n## Go Server\n\n```shell\n. run.sh compile_protos\n. run.sh go_server\n```\n\n```go\nfunc (server *grpc_server) SayHello(\n  ctx context.Context, args *pb.HelloRequest) (*pb.HelloReply, error) {\n\n  return \u0026pb.HelloReply{\n    Message: \"hello \" + args.Name + \"!\"}, nil\n}\n\nserver := buildServer()\n\nlistenServer(server, \"50051\")\n```\n\n## Go Client\n```shell\n. run.sh go_client\n```\n\n```go\n_, client := buildClient(\"localhost:50051\")\n\nresponse, _ := client.SayHello(\n  context.Background(), \u0026pb.HelloRequest{Name: \"gbaptista\"})\n\nresponse.Message // 'hello gbaptista!'\n```\n\n## Ruby Client\n```shell\n. run.sh ruby_client\n```\n\n```ruby\nclient = Hello::Client.new(\n  'localhost:50051',\n  :this_channel_is_insecure\n)\n\nresponse = client.say_hello(\n  Hello::HelloRequest.new(name: 'gbaptista')\n)\n\nresponse.message # =\u003e 'hello gbaptista!'\n```\n\n## Javascript Web Client\n```shell\ndocker-compose up -d\n\ncd src/web_js_client/\n\nnpm install\nnpm start\n\n\u003e http://localhost:8080\n```\n\n```es6\ngrpc_client = new HelloServiceClient(\n  'http://localhost:50052'\n);\n\nconst request = new HelloRequest();\nrequest.setName('gbaptista');\n\ngrpc_client.sayHello(request, {}, (error, response) =\u003e {\n  if(error) {\n    console.error(error);\n  } else {\n    console.error(response); // 'hello gbaptista!'\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbaptista%2Fgrpc-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbaptista%2Fgrpc-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbaptista%2Fgrpc-demos/lists"}