This is an example of a simple gRPC server and client that can be tested locally or in a deployed environment, such as Amazon ECS with Fargate instances.
cd greeter_server
- Open up a terminal window.
- Run
npm install
- Run
node greeter_server.js
- Open up a second terminal window.
cd greeter_client
- Run
npm install
- Run
node greeter_client.js
Make sure to:
- Create a Docker Hub account (if you don't have one).
- Create a repo for
greeter_server
and separate one forgreeter_client
. - cd into
/greeter_server
or/greeter_client
before running the commands below for each service.
docker build -t <DOCKER_USERNAME>/<DOCKER_REPO>:latest .
docker push <DOCKER_USERNAME>/<DOCKER_REPO>:latest