{"id":28760884,"url":"https://github.com/saranonearth/chair-stack-grpc-rest","last_synced_at":"2026-05-15T13:04:54.061Z","repository":{"id":99389538,"uuid":"292858838","full_name":"saranonearth/chair-stack-grpc-rest","owner":"saranonearth","description":"Implementation of gRPC and grpc-web with GoLang. Demonstration project for presentation on grpc .🚀🐶 ","archived":false,"fork":false,"pushed_at":"2020-09-08T11:24:45.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T06:11:25.742Z","etag":null,"topics":["golang","grpc","grpc-client","grpc-go","grpc-web","protobuf"],"latest_commit_sha":null,"homepage":"","language":"Go","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/saranonearth.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,"zenodo":null}},"created_at":"2020-09-04T13:45:48.000Z","updated_at":"2020-09-08T11:24:48.000Z","dependencies_parsed_at":"2023-04-03T15:09:14.971Z","dependency_job_id":null,"html_url":"https://github.com/saranonearth/chair-stack-grpc-rest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saranonearth/chair-stack-grpc-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saranonearth%2Fchair-stack-grpc-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saranonearth%2Fchair-stack-grpc-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saranonearth%2Fchair-stack-grpc-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saranonearth%2Fchair-stack-grpc-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saranonearth","download_url":"https://codeload.github.com/saranonearth/chair-stack-grpc-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saranonearth%2Fchair-stack-grpc-rest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003897,"owners_count":26083641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","grpc","grpc-client","grpc-go","grpc-web","protobuf"],"created_at":"2025-06-17T06:10:18.051Z","updated_at":"2025-10-10T12:33:42.887Z","avatar_url":"https://github.com/saranonearth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chair-stack-grpc-rest\n[![2dZHSs.md.png](https://i.ibb.co/WDZHJdp/chairstack.png)](https://i.ibb.co/WDZHJdp/chairstack.png)\n\nThis project contains implementation of REST and gRPC for a small application called ChairStack using Go Lang. \n\n##### To compile .proto to .go file\n```\n\nprotoc services.proto --go_out=plugin=grpc .\n\n```\n\n##### To compile .proto to .js file\n```\n\n protoc services.proto --js_out=import_style=commonjs:..\\client\\proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:..\\client\\proto\n\n```\n\n#### gRPC Web Wrapper\n```\ngrpcServer := grpc.Server()\ngrpcWebServer := grpcweb.WrapServer(grpcServer)\nhttpServer = \u0026http.Server{\n  Handler: h2c.NewHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { \n    if r.ProtoMajor == 2 {\n      grpcWebServer.ServeHTTP(w, r)\n    } else { \n      w.Header().Set(\"Access-Control-Allow-Origin\", \"*\")\n      w.Header().Set(\"Access-Control-Allow-Methods\", \"POST, GET, OPTIONS, PUT, DELETE\")\n      w.Header().Set(\"Access-Control-Allow-Headers\", \"Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, X-User-Agent, X-Grpc-Web\")\n      w.Header().Set(\"grpc-status\", \"\")\n      w.Header().Set(\"grpc-message\", \"\") \n      if grpcWebServer.IsGrpcWebRequest(r) {\n        grpcWebServer.ServeHTTP(w, r) \n      }\n    }\n  }), \u0026http2.Server{}),\n}\n```\n\nMore: https://rogchap.com/2019/07/26/in-process-grpc-web-proxy/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaranonearth%2Fchair-stack-grpc-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaranonearth%2Fchair-stack-grpc-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaranonearth%2Fchair-stack-grpc-rest/lists"}