A Follow along from Distrubted systems with NodeJS
  • JavaScript 100%
Find a file
Riley Seaburg 17f8edac18 Update readme
2021-10-31 11:46:52 -04:00
recipe-api Add gRPC & readme 2021-10-31 11:46:00 -04:00
shared Add gRPC & readme 2021-10-31 11:46:00 -04:00
web-api Add gRPC & readme 2021-10-31 11:46:00 -04:00
.gitignore Add gRPC & readme 2021-10-31 11:46:00 -04:00
package.json Add gRPC & readme 2021-10-31 11:46:00 -04:00
README.md Update readme 2021-10-31 11:46:52 -04:00
yarn.lock Add gRPC & readme 2021-10-31 11:46:00 -04:00

Distributed NodeJS Examples

Table of Contents

About

This is a working code repo created fot the book Distributed Systems with Node.js by Thomas Hunter.

There are two main components of this repo: The recipe API and the Web API. Each component has a couple of different options for starting the service depending on which protocol you want to use.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Node.js, npm and Yarn are required to run this project.

npm i -g yarn

Installing

A step by step series of examples that tell you how to get a development env running.

Clone the repo:

git clone https://github.com/RileySeaburg/distributed-node.git

Install Package Dependencies

cd web-api yarn 

And repeat

cd recipe-api yarn

End with an example of getting some data out of the system or using it for a little demo.

Usage

Currently HTTP and gRPC are implemented the files are labeled with the protocol name.

HTTP

Start the recipe API with the following command:

cd recipe-api
node producer-http-basic.js

Start the web API Consumer with the following command:

cd web-api
node consumer-http-basic.js

gRPC

Start the recipe API with the following command:

cd recipe-api
node producer-grpc.js

Start the web API Consumer with the following command:

cd web-api
node consumer-grpc.js