This directory contains a simple starter service client written in Kotlin against generated models (protos)
You can find detailed instructions for running the client below
- Bar Service Client using gRPC and Kotlin. For details, see the project on github.
The starter sources are organized into the following top-level folders:
- starter-service-models:
.proto
files for generating the stubs - starter-service-client: Kotlin clients based on regular stub artifacts
-
Install Homebrew
Download and install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install JDK
Install any version of JDK (8 preferred):
brew install openjdk@8
Add the installed version of JDK to your path through .zshrc or .bash_profile
echo 'export PATH="/usr/local/opt/openjdk@8/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
or
echo 'export PATH="/usr/local/opt/openjdk@8/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile
-
Clone the project
Clone the project recursively cloning all submodules
git clone git@github.com:hwslabs/bar-service-kotlin-client.git --recurse-submodules
Navigate into the project:
cd grpc-kotlin-starter
-
Run the client
Run the client which will make requests to the server using 50051 port:
./gradlew starter-service-client:start