- Ensure
protoc
executable is available. On macOS this can be done by using brewbrew install protobuf
bundle install
- Create a
.proto
file. E.g. inproto
directory - Run the
protoc
compiler to generate Ruby classesprotoc --ruby_out=. proto/user.proto
- Create a Sinatra Server, e.g.
app.rb
- Create a client (http in this case), e.g.
- Run it on port 4321
ruby app.rb -p 4321
- Use the client
client.rb
to call the restful app
ruby client.rb
Work in Progress