https://github.com/danny-yamamoto/go-connect-sample
Sample of connect.
https://github.com/danny-yamamoto/go-connect-sample
Last synced: about 2 months ago
JSON representation
Sample of connect.
- Host: GitHub
- URL: https://github.com/danny-yamamoto/go-connect-sample
- Owner: danny-yamamoto
- Created: 2023-05-08T07:39:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-03T00:59:00.000Z (almost 2 years ago)
- Last Synced: 2025-02-02T18:20:33.124Z (4 months ago)
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-connect-sample
Getting started## Usage
```bash
go run ./cmd/server/main.go
```## Install
```bash
go mod init github.com/danny-personal/go-connect-sample
go install github.com/bufbuild/buf/cmd/buf@latest
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@latest
[ -n "$(go env GOBIN)" ] && export PATH="$(go env GOBIN):${PATH}"
[ -n "$(go env GOPATH)" ] && export PATH="$(go env GOPATH)/bin:${PATH}"
mkdir -p greet/v1
touch greet/v1/greet.proto
touch buf.gen.yaml
buf generate
go mod tidy
mkdir -p cmd/server
touch cmd/server/main.go
go get golang.org/x/net/http2
go get golang.org/x/net/http2
go get github.com/bufbuild/connect-go
go get go-connect-sample/greet/v1
go install go-connect-sample/greet/v1
go mod edit -replace github.com/danny-personal/go-connect-sample/gen/greet/v1/greetv1connect=../gen/greet/v1/greetv1connect
go mod edit -replace github.com/danny-personal/go-connect-sample/gen/greet/v1=../gen/greet/v1
go mod tidy
```