Skip to content

scottjbarr/grpcsay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRPC Say

A little demo for making a business logic (a service) available over GRPC and HTTP.

Uses tiny Gophers for cuteness! \ʕ◔ϖ◔ʔ/

Install grpc, protobuf etc

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u google.golang.org/grpc

Install protoc

See https://github.com/google/protobuf/releases

Build

Generate the .proto files, and build the binaries.

make

Run

Start the HTTP interface

BIND=:9000 ./bin/grpcsay_http

Start the GRPC interface

BIND=:50051 ./bin/grpcsay_server

Run the GRPC client

# ADDRESS=localhost:50051 ./bin/grpcsay_client "GRPC is fiiiine"

 _________________
< GRPC is fiiiine >
 -----------------
   \
    \
  \ʕ◔ϖ◔ʔ/

Hit the HTTP interface

# curl http://localhost:9000/?m=HTTP+is+nice

 ______________
< HTTP is nice >
 --------------
   \
    \
  \ʕ◔ϖ◔ʔ/

References

License

The MIT License (MIT)

Copyright (c) 2017 Scott Barr

See LICENSE.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published