{"id":28910677,"url":"https://github.com/ekkinox/bazel-demo","last_synced_at":"2026-04-07T08:32:26.099Z","repository":{"id":57695192,"uuid":"488959459","full_name":"ekkinox/bazel-demo","owner":"ekkinox","description":"Golang +  gRPC + Protobuf + Bazel demo","archived":false,"fork":false,"pushed_at":"2022-05-06T19:07:51.000Z","size":27,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T19:02:53.627Z","etag":null,"topics":["bazel","bazel-examples","gazelle","golang","grpc","grpc-gateway","grpc-go","openapi","protobuf"],"latest_commit_sha":null,"homepage":"","language":"Starlark","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/ekkinox.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}},"created_at":"2022-05-05T12:16:20.000Z","updated_at":"2025-06-18T14:13:09.000Z","dependencies_parsed_at":"2022-09-26T16:40:17.392Z","dependency_job_id":null,"html_url":"https://github.com/ekkinox/bazel-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ekkinox/bazel-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkinox%2Fbazel-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkinox%2Fbazel-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkinox%2Fbazel-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkinox%2Fbazel-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekkinox","download_url":"https://codeload.github.com/ekkinox/bazel-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekkinox%2Fbazel-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31506562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bazel","bazel-examples","gazelle","golang","grpc","grpc-gateway","grpc-go","openapi","protobuf"],"created_at":"2025-06-21T18:14:30.759Z","updated_at":"2026-04-07T08:32:26.078Z","avatar_url":"https://github.com/ekkinox.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bazel demo\n\n\u003e [Golang](https://go.dev/) based demo project, relying on [Bazel](https://bazel.build/).\n\nThis project provides the following components:\n- [protobuf](https://developers.google.com/protocol-buffers) definition located in the [proto](proto) folder\n- golang backend application acting as [gRPC](https://grpc.io/) server (using Bazel autogenerated stubs)\n- golang client application to be able to test interactions with the server (using Bazel autogenerated stubs)\n- golang [gRPC-gateway](https://github.com/grpc-ecosystem/grpc-gateway) acting as a REST - gRPC reverse proxy (using Bazel autogenerated stubs)\n- open api documentation for the REST interface of the gRPC-gateway (autogenerated by Bazel)\n\n## Table of contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Commands](#commands)\n\n## Installation\n\nYou first need to install [Bazel](https://bazel.build/) on your machine.\n\nThen, you can build the project using:\n\n```shell\nbazel build //...\n```\n\n## Usage\n\n- To run the go gRPC server, located in the [backend](backend) folder (will listen on `:50051`):\n\n```shell\nbazel run //backend\n```\n\n- To start the go gRPC client, located in the [client](client) folder:\n\n```shell\nbazel run //client\n```\n\n- To start the go gRPC gateway, located in the [gateway](gateway) folder (will listen on `:8888`):\n\n```shell\nbazel run //gateway\n```\n\nNote: you can check the autogenerated [openapi documentation](https://editor.swagger.io/?url=https://raw.githubusercontent.com/ekkinox/bazel-demo/main/openapi/calculator.swagger.json) to know how to use the gateway.\n\n## Commands\n\n- Bazel (build \u0026 test tool)\n```shell\n#list dependency graph targets\nbazel query //... --output label_kind | sort | column -t \n\n#build all targets\nbazel build //... \n\n#buld target XXX \nbazel build //XXX \n\n#run target XXX \nbazel run //XXX \n```\n\n- Gazelle (BUILD file generator)\n```shell\n#build / refresh all BUILD files of the repository tree\nbazel run //:gazelle \n\n#build / refresh using go.mod\nbazel run //:gazelle -- update-repos -from_file=go.mod \n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkinox%2Fbazel-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekkinox%2Fbazel-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekkinox%2Fbazel-demo/lists"}