Skip to content

Template for a express powered GCP cloud function in TypeScript, deployed with Circle CI

License

Notifications You must be signed in to change notification settings

StefanKjartansson/ts-express-cloud-function-template

Repository files navigation

ts-express-cloud-function-template

Project template for spinning up express powered cloud functions written in TypeScript and deployed via circleci.

Pre-reqs

Getting started

  • Clone the repository
git clone --depth=1 https://github.com/StefanKjartansson/ts-express-cloud-function-template.git <project_name>
  • Install dependencies
cd <project_name>
yarn install
  • Update package.json with <project_name> and related information.
  • Write code

Configuring services & deployment pipeline

  • In GCP, enable cloud functions for your project
  • Export service account key with cloud function developer permissions
  • Configure project in circleci and add the following environment variables:
GCP_AUTH=Value should be base64 encoded service account key "base64 <your-service-account.json>"
GCP_PROJECT=Your project id from GCP.
GCP_FUNCTION=The name of the function in GCP.
  • Push change and circle should deploy your function.
  • When calling your function, remember to append a slash to the path

About

Template for a express powered GCP cloud function in TypeScript, deployed with Circle CI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published