This codebase was built as a demo to practice RPC with Go and Javascript (node). The RPC server was built in Go, you can find the codebase here.
- 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)
- clone this repo by running:
git clone https://github.com/ichtrojan/node-rpc-client.git- change directory into the repo:
cd node-rpc-client- Install dependencies:
npm install- Create
.envfrile from sample:
cp .env.example .env- Run the client
node client.jsBy 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.
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
