[go: up one dir, main page]

Skip to content

firstthumb/twirp-gcloud-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twirp-cloud-function

Google Cloud Function using Twirp

Just try

On your local machine

protoc --proto_path=$GOPATH/src:. --twirp_out=. --go_out=. ./proto/greeter.proto

go run cmd/main.go

... split terminal ...

curl --request "POST" \
     --location "http://localhost:3000/twirp/com.ekocaman.greeter.Greeter/Greet" \
     --header "Content-Type:application/json" \
     --data '{"name":"John"}' \
     --verbose

> {"greeting":"Hello, John!"}

Deploy to Google Cloud

gcloud functions deploy Greeter --runtime go111 --trigger-http --region=us-central1

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages