Skip to content

Learn how to build, test and deploy a google cloud function written in the Kotlin programming language

Notifications You must be signed in to change notification settings

mwhyte-dev/kotlin-google-cloud-function

Repository files navigation

kotlin-google-cloud-function

Full blog post here: mwhyte.dev/Creating-Google-Cloud-Functions-With-Kotlin

Running the function locally.
Basic
./gradlew runFunction 
With args
./gradlew runFunction -PrunFunction.target=dev.mwhyte.function.App -PrunFunction.port=8080
Deploying to GCloud (basic)
Set region
gcloud config set functions/region europe-west1
build function
./gradlew buildFunction
deploy function
gcloud functions deploy my-test-function \
--entry-point=dev.mwhyte.function.App \
--source=build/deploy --runtime=java11 --trigger-http \
--allow-unauthenticated
gcloud functions describe my-test-function
trigger function
curl https://<your-region>-<you-project-name>.cloudfunctions.net/my-test-function
remove function from gcp
gcloud functions delete my-test-function

About

Learn how to build, test and deploy a google cloud function written in the Kotlin programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages