Skip to content

mcatta/kotlin-template-gcloud-function

 
 

Repository files navigation

kotlin-template-gcloud-function

This is a kotlin template is based on mwhyte-dev/kotlin-google-cloud-function repository.

You can find the author's article here.

Running the function locally.
Basic
./gradlew runFunction 
With args
./gradlew runFunction -PrunFunction.target=dev.mcatta.function.HttpSampleApp -PrunFunction.port=8080
Deploying to GCloud (basic)
Set region
gcloud config set functions/region europe-west1
deploy function
gcloud functions deploy my-test-function \
--entry-point=dev.mcatta.function.HttpSampleApp \
--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

Kotlin template for Google Cloud Function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%