gRPC Kotlin starter
This directory contains a simple bar service written as a Kotlin gRPC example.
You can find detailed instructions for building and running example from below
- Bar Service using gRPC and Kotlin. For details, see the project on github.
The starter sources are organized into the following top-level folders:
.protofiles for generating the stubs
- stub: regular Java & Kotlin stub artifacts from protos
- server: Kotlin servers based on regular stub artifacts
- client: Kotlin clients based on regular stub artifacts
Set up and run the starter on macOS
Download and install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install any version of JDK (8 preferred):
brew install [email protected]
Add the installed version of JDK to your path through .zshrc or .bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile
Clone the project and run the bar service and client starter
Clone and navigate into the project:
git clone https://github.com/hwslabs/grpc-kotlin-starter.git cd grpc-kotlin-starter
Start the server:
In another console, run the client which will make requests to the server: