{"id":23315460,"url":"https://github.com/ihoro/rough-rx-grpc","last_synced_at":"2025-09-13T01:23:16.239Z","repository":{"id":34136500,"uuid":"169375777","full_name":"ihoro/rough-rx-grpc","owner":"ihoro","description":"The simplest RxJS wrapper around grpc lib","archived":false,"fork":false,"pushed_at":"2023-08-15T23:54:38.000Z","size":46,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T06:01:45.290Z","etag":null,"topics":["grpc","javascript","nodejs","protobuf","reactive-extensions","rxjs","wrapper"],"latest_commit_sha":null,"homepage":"","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/ihoro.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-06T08:35:34.000Z","updated_at":"2022-06-05T10:25:50.000Z","dependencies_parsed_at":"2025-03-25T06:01:36.113Z","dependency_job_id":"af0f0977-8e0f-4426-b6d8-7a1b3946d413","html_url":"https://github.com/ihoro/rough-rx-grpc","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/ihoro%2Frough-rx-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihoro%2Frough-rx-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihoro%2Frough-rx-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ihoro%2Frough-rx-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ihoro","download_url":"https://codeload.github.com/ihoro/rough-rx-grpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247586037,"owners_count":20962439,"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":["grpc","javascript","nodejs","protobuf","reactive-extensions","rxjs","wrapper"],"created_at":"2024-12-20T15:37:51.578Z","updated_at":"2025-04-07T03:28:02.902Z","avatar_url":"https://github.com/ihoro.png","language":"JavaScript","readme":"# The simplest RxJS wrapper around grpc lib\n\n[![Build Status](https://travis-ci.com/ihoro/rough-rx-grpc.svg?branch=master)](https://travis-ci.com/ihoro/rough-rx-grpc)\n[![npm version](https://badge.fury.io/js/%40rough%2Frx-grpc.svg)](https://badge.fury.io/js/%40rough%2Frx-grpc)\n\nRough implementation of [rxified](https://npmjs.com/rxjs) wrapper and tools for [grpc-js](https://www.npmjs.com/package/@grpc/grpc-js) lib.\n\n## Usage example\n\n```proto\n// GreetingService.proto\n\nsyntax = \"proto3\";\n\npackage org.example;\n\nservice GreetingService {\n  rpc Greet(Request) returns (Response);\n}\n\nmessage Request {\n  string name = 1;\n}\n\nmessage Response {\n  string message = 1;\n}\n```\n\n```js\n// server.js\n\nclass GreetingService {\n  Greet(call, callback) {\n    const name = call.request.name;\n    if (name)\n      callback(null, { message: `Hello, ${name}!` });\n    else\n      callback(new Error('Name is not defined.'));\n  }\n}\n\nconst RxGrpc = require('@rough/rx-grpc');\nnew RxGrpc()\n  .withProtoFiles(__dirname + '/*.proto')\n  .serve('org.example.GreetingService', new GreetingService())\n  .startServer()\n  .subscribe(\n    started =\u003e console.log('Listening at grpc://0.0.0.0:50051 ...'),\n    err =\u003e console.log(err),\n    complete =\u003e {}\n  );\n```\n\n```js\n// client.js\n\nconst { flatMap } = require('rxjs/operators');\nconst RxGrpc = require('@rough/rx-grpc');\n\nconst rxgrpc = new RxGrpc().withProtoFiles(__dirname + '/*.proto');\n\nconst name = (process.argv.length \u003e 2) ? process.argv[2] : null;\n\nrxgrpc.service('org.example.GreetingService', 'localhost:50051').pipe(\n  flatMap(GreetingService =\u003e GreetingService.Greet({ name }))\n)\n.subscribe(\n  response =\u003e console.log(response.message),\n  err =\u003e console.log(err),\n  complete =\u003e {}\n);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihoro%2Frough-rx-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fihoro%2Frough-rx-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fihoro%2Frough-rx-grpc/lists"}