Skip to content

thinkerou/grpc-scala-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpc-scala-json

Simple example of grpc-java with ScalaPB and scalapb-json4s.

Server

Run the following command:

cd grpc-scala-json
➜  sbt
sbt:grpc-scala-json> compile
sbt:grpc-scala-json> run
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list

Multiple main classes detected, select one to run:

 [1] helloworld.HelloWorldClient
 [2] helloworld.HelloWorldServer
[info] Packaging /Users/thinkerou/grpc-scala-json/target/scala-2.12/grpc-scala-json_2.12-0.1.jar ...
[info] Done packaging.

Enter number: 2

[info] Running helloworld.HelloWorldServer
Apr 28, 2018 4:16:29 PM helloworld.HelloWorldServer helloworld$HelloWorldServer$$start
信息: Server started and listening on 50052

Client

Run the following command and input the path of JSON file:

cd grpc-scala-json
➜  sbt
sbt:grpc-scala-json> runMain helloworld.HelloWorldClient ./data/helloworld.json

Default path of helloworld.json is ./data/helloworld.json.

About

Simple example of grpc with ScalaPB and JSON.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages