Skip to content

ichtrojan/node-rpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPC Client in NodeJS

hero

Introduction

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.

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:
git clone https://github.com/ichtrojan/node-rpc-client.git
  • change directory into the repo:
cd node-rpc-client
  • Install dependencies:
npm install
  • Create .env frile from sample:
cp .env.example .env
  • Run the client
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

Releases

No releases published

Packages

No packages published