https://github.com/ichtrojan/node-rpc-client
A RPC client demo built in NodeJS
https://github.com/ichtrojan/node-rpc-client
grpc javascript node nodejs rpc
Last synced: 6 months ago
JSON representation
A RPC client demo built in NodeJS
- Host: GitHub
- URL: https://github.com/ichtrojan/node-rpc-client
- Owner: ichtrojan
- Created: 2020-05-05T14:49:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-12T01:04:47.000Z (about 4 years ago)
- Last Synced: 2023-02-28T13:23:02.483Z (about 2 years ago)
- Topics: grpc, javascript, node, nodejs, rpc
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RPC Client in NodeJS

## Introduction
This codebase was built as a demo to practice RPC with [Go](https://golang.org) and [Javascript (node)](http://nodejs.org).
The RPC server was built in Go, you can find the codebase [here](https://github.com/ichtrojan/grpc-server).## Prerequisites
* Protobuf installed on you machine
* NodeJS installed on your Machine
* Basic understanding of the basics of RPC
* Fundamental knowledge of NodeJS
* Fundamental knowledge of Go (to set up the RPC server)## Installation
* clone this repo by running:
```bash
git clone https://github.com/ichtrojan/node-rpc-client.git
```* change directory into the repo:
```bash
cd node-rpc-client
```* Install dependencies:
```bash
npm install
```* Create `.env` frile from sample:
```bash
cp .env.example .env
```* Run the client
```bash
node client.js
```By default, the client will listen on `localhost` via port `9000`. which is what was duplicated from the `.env.example` file and also what is defined in the RPC server config assuming all configuration are left as default.
## Conclusion
I would normally explain what every line does. But, I do not have the mental bandwidth to do so at the moment.
You can take a look at the hero image at the top, my IDE did its best to explain what each parameter does.Regards
Michael Trojan Okoh