Skip to content

bwilczynski/homeapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home API

Installation

brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
export PATH="$PATH:$(go env GOPATH)/bin"

Generate protobuf

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    server/lights/lights.proto

Start server

go run cmd/server/main.go

Test services

Make sure to have grpcurl installed:

brew install grpcurl

List services:

grpcurl -plaintext localhost:8000 list

Invoke methods:

grpcurl -plaintext localhost:8000 LightService/List

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors