Skip to content

rongfengliang/gprc-elixir-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helloworld in grpc-elixir

Usage

  1. Install deps and compile
$ mix do deps.get, compile
  1. Run the server
$ mix grpc.server
  1. Run the client script
$ mix run priv/client.exs

Regenerate Elixir code from proto

  1. Modify the proto priv/protos/helloworld.proto
  2. Install protoc here
  3. Install protoc-gen-elixir
mix escript.install hex protobuf
  1. Generate the code:
$ protoc -I priv/protos --elixir_out=plugins=grpc:./lib/ priv/protos/helloworld.proto

Refer to protobuf-elixir for more information.

How to start server when starting your application?

Change the config to:

config :grpc, start_server: true

golang client demo

see grpc golang client

Releases

No releases published

Packages

No packages published

Languages