{"id":20314775,"url":"https://github.com/xizon/grpc-getting-started","last_synced_at":"2025-04-11T17:21:13.814Z","repository":{"id":142469543,"uuid":"613434171","full_name":"xizon/grpc-getting-started","owner":"xizon","description":"Demonstration of the use of gRPC and front-end.","archived":false,"fork":false,"pushed_at":"2023-09-25T09:29:10.000Z","size":11729,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T13:11:35.183Z","etag":null,"topics":["envoy","envoyproxy","grpc","grpc-web"],"latest_commit_sha":null,"homepage":"http://localhost:10005","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xizon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-13T15:03:50.000Z","updated_at":"2024-12-30T08:54:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"28590aa3-d95a-4db3-b3c6-995ceb1f2d51","html_url":"https://github.com/xizon/grpc-getting-started","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xizon%2Fgrpc-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xizon%2Fgrpc-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xizon%2Fgrpc-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xizon%2Fgrpc-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xizon","download_url":"https://codeload.github.com/xizon/grpc-getting-started/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248196713,"owners_count":21063490,"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","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","envoyproxy","grpc","grpc-web"],"created_at":"2024-11-14T18:16:39.965Z","updated_at":"2025-04-11T17:21:13.792Z","avatar_url":"https://github.com/xizon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC Getting Started\n\nDemonstration of the use of gRPC and front-end.\n\n\n![quick overview](preview.gif)\n\n\n## (Ⅰ) Original tutorial (simple)\n\n- [(original version)English Documentation](README_TUTORIAL.md)\n- [(最初版)中文版说明文档](README_TUTORIAL_CN.md)\n\n\n## (Ⅱ) How to use this repository\n\n\n### Step 1: Run the Envoy proxy. \n\nThe **envoy.yaml** file configures Envoy to listen to browser requests at port `12345`, and forward them to port `9090`.\n\n```sh\n$ npm run proxy\n```\n\n### Step 2: User Interaction Test\n\n\n - the NodeJS gRPC Service (port `9090`)\n - the webpack server (port `10005`)\n\n\nrun following command to test:\n\n```sh\n$ npm run start\n```\n\nWhen these are all ready, you can open a browser tab and navigate to `http://localhost:10005`\n\n\n### Step 3: (optional) Build proto files and client files\n\n#### a) Run the following command to compile the `.proto` file and generate a `.js` file we can recognize.\n\n```sh\n$ npm run build:protos\n```\n\n#### b) Create client file\n\nIt will generate a js file `dist/client-main.js` and a html file `dist/index.html`\n\n```sh\n$ npm run build:client\n```\n\n\n## (Ⅲ) Create a API file\n\nThis file is to call with `\u003cscript\u003e`, which is used as the interface of gRPC API.\n\n\nExecute the build command below, it will generate a js file `dist-api/api-main.js` and a html file `dist-api/index.html`\n\n```sh\n$ npm run build:api-prod\n```\nor\n\n```sh\n$ npm run build:api-dev\n```\n\nNext, Use `api-main.js` to call the interface and run following command:\n\n```js\n$ npm run proxy\n$ npm run test:api\n```\n\nVisit `http://localhost:4002` to test, it will output in the console: **\"Hello: string 1 string 2\"**\n\n\n## Licensing\n\nLicensed under the [MIT](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxizon%2Fgrpc-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxizon%2Fgrpc-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxizon%2Fgrpc-getting-started/lists"}