Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

HTTP Cloud Function (gen 2)

This project is a getting starter guide for working with HTTP Cloud Functions.

Download template locally with gonew

  • Install gonew if you have not already.
go install golang.org/x/tools/cmd/gonew@latest
  • Download this template locally:
gonew github.com/GoogleCloudPlatform/go-templates/functions/httpfn your.domain/httpfn

Deploy

gcloud functions deploy hello-http \
--gen2 \
--runtime=go120 \
--region=us-central1 \
--source=. \
--entry-point=HelloHTTP \
--trigger-http \
--allow-unauthenticated

Note, in projection environments consider removing the --allow-unauthenticated flag.

Resources