Skip to content

meteatamel/cloud-code-custom-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom templates for Cloud Code

What are these templates?

This repository contains some starter Cloud Functions and Cloud Run templates for Cloud Code for VS Code for different languages. Each template includes minimal starter code for HTTP or CloudEvent triggered Cloud Functions or Cloud Run services that use the recommended libraries (CloudEvents SDK and Google CloudEvents libraries) for each language. They also includes lightweight gcloud based scripts to quickly test services locally, deploy to the cloud, and test in the cloud.

Why these templates?

Cloud Code comes with some default Cloud Run and Cloud Functions templates (hosted in cloud-code-samples repo) but they're limited:

  • Only four languages are supported (Node.js, Python, Go, and Java) in Cloud Functions templates and deployment. I’ve especially missed the NET support.
  • Templates for Cloud Run and Cloud Functions are only for HTTP triggered services. No templates for event triggered services.
  • Testing only works against deployed HTTP triggered services. No testing support for locally running services or event triggered services.

How do I use these templates?

You can use these templates in standalone Cloud Code for VS Code or the Cloud Code in the editor of Cloud Shell in the browser.

To use these templates as starter projects:

  1. Click on Cloud Code in VS Code.
  2. Select New Application -> Custom Application -> Import Sample from Repo
  3. Point to this repository.
  4. Choose a template as a starter project and follow the instructions in the README.mdof the template.

Install templates

Templates

Cloud Functions

.NET:

Java:

Node.js:

Python:

Cloud Run

.NET:

Java:

Node.js:

Python:


This is not an official Google product.

About

Repository for various custom samples for Cloud Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published