{"id":16188256,"url":"https://github.com/konsumer/grpcnode","last_synced_at":"2025-07-30T21:04:18.932Z","repository":{"id":54533301,"uuid":"79969203","full_name":"konsumer/grpcnode","owner":"konsumer","description":"Simple GRPC server \u0026 client","archived":false,"fork":false,"pushed_at":"2021-02-12T13:26:53.000Z","size":549,"stargazers_count":7,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T03:04:29.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/konsumer.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}},"created_at":"2017-01-25T00:37:16.000Z","updated_at":"2021-07-07T17:37:52.000Z","dependencies_parsed_at":"2022-08-13T19:00:21.443Z","dependency_job_id":null,"html_url":"https://github.com/konsumer/grpcnode","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fgrpcnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fgrpcnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fgrpcnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fgrpcnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konsumer","download_url":"https://codeload.github.com/konsumer/grpcnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350674,"owners_count":20439284,"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":[],"created_at":"2024-10-10T07:25:37.793Z","updated_at":"2025-03-19T03:30:40.287Z","avatar_url":"https://github.com/konsumer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple node-based gRPC client/server\n\nWhen you want a quick gRPC server or client, made with node.\n\n[![NPM](https://nodei.co/npm/grpcnode.png?compact=true)](https://nodei.co/npm/grpcnode/)\n\n## cli\n\nInstall with `npm i -g grpcnode`.\n\nNow, you can use it like this:\n\n```\ngrpcnode \u003ccommand\u003e\n\nCommands:\n  grpcnode server \u003cFILES...\u003e  Start a gRPC server with your proto and javascript files\n  grpcnode client             Act as a client of a gRPC server\n\nOptions:\n  --help         Show help                                           [boolean]\n  --ca           SSL CA cert\n  --key          SSL server key\n  --cert         SSL server certificate\n  -h, --host     The host/port to run the gRPC server on             [default: \"localhost:50051\"]\n  -v, --version  Show version number                                 [boolean]\n  -I, --include  Root include path (sorry only one root-path works)\n\nExamples:\n  grpcnode client --help  Get more help about the client command\n  grpcnode server --help  Get more help about the server command\n```\n\n### ssl\n\nWith SSL, you will need the Cert Authority certificate, client \u0026 server signed certificate and keys.\n\n\nI generated/signed my demo keys like this:\n\n```\nopenssl genrsa -passout pass:1111 -des3 -out ca.key 4096\nopenssl req -passin pass:1111 -new -x509 -days 365 -key ca.key -out ca.crt -subj  \"/C=US/ST=Oregon/L=Portland/O=Test/OU=CertAuthority/CN=localhost\"\nopenssl genrsa -passout pass:1111 -des3 -out server.key 4096\nopenssl req -passin pass:1111 -new -key server.key -out server.csr -subj  \"/C=US/ST=Oregon/L=Portland/O=Test/OU=Server/CN=localhost\"\nopenssl x509 -req -passin pass:1111 -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt\nopenssl rsa -passin pass:1111 -in server.key -out server.key\nopenssl genrsa -passout pass:1111 -des3 -out client.key 4096\nopenssl req -passin pass:1111 -new -key client.key -out client.csr -subj \"/C=US/ST=Oregon/L=Portland/O=Test/OU=Client/CN=localhost\"\nopenssl x509 -passin pass:1111 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt\nopenssl rsa -passin pass:1111 -in client.key -out client.key\n```\n\nThen use it on server, like this:\n\n```\ngrpcnode server --ca=ca.crt --key=server.key --cert=server.crt -I example/ example/helloworld.proto example/helloworld.js\n```\n\nAnd client, like this:\n\n```\ngrpcnode client run --ca=ca.crt --key=client.key --cert=client.crt -I example/proto helloworld.proto -c '/helloworld.v1.Greeter/SayGoodbye({\"name\":\"World\"})'\n```\n\n### examples\n\nYou can see an example project [here](https://github.com/konsumer/grpcnode/tree/master/example) that shows how to use all the CLI tools, with no code other than your endpoint implementation.\n\n- Get a list of methods/message-types: `grpcnode client ls -I ./example/proto helloworld.proto`\n- Start a server: `grpc-server -I example/ example/*.js example/*.proto` or `node server.js -I example/ example/helloworld.js helloworld.proto`\n- Run an RPC on server: `grpcnode server -I example/proto helloworld.proto example/helloworld.js`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fgrpcnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonsumer%2Fgrpcnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fgrpcnode/lists"}