---
title: "Google Cloud Functions in Python, Go, and TypeScript Deployed with TypeScript"
description: "Basic example of a serverless GCP functions in TypeScript, Python and Go"
url: "https://www.pulumi.com/dev/examples/gcp-ts-serverless-raw/"
image: "https://www.pulumi.com/assets/og/dev/examples/gcp-ts-serverless-raw.png"
---

# Google Cloud Functions in Python, Go, and TypeScript Deployed with TypeScript

Basic example of a serverless GCP functions in TypeScript, Python and Go

- Source on GitHub: https://github.com/pulumi/examples/tree/master/gcp-ts-serverless-raw
- Deploy with Pulumi: https://app.pulumi.com/new?template=https%3A%2F%2Fgithub.com%2Fpulumi%2Fexamples%2Ftree%2Fmaster%2Fgcp-ts-serverless-raw

## Get started with this example

This example lives in the [pulumi/examples](https://github.com/pulumi/examples/tree/master/gcp-ts-serverless-raw) repo. Pull down just this directory to follow along:

```bash
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set gcp-ts-serverless-raw
cd pulumi-examples/gcp-ts-serverless-raw
```

This example deploys three Google Cloud Functions. "Hello World" functions are implemented in Python, Go, and TypeScript. Pulumi program is implemented in TypeScript.

```bash
# Create and configure a new stack
$ pulumi stack init testing
$ pulumi config set gcp:project <your-gcp-project>
$ pulumi config set gcp:region <gcp-region>

# Install dependencies
$ npm install

# Preview and run the deployment
$ pulumi up
Previewing changes:
...
Performing changes:
...
info: 6 changes performed:
    + 6 resources created
Update duration: 1m14s

# Test it out
$ curl $(pulumi stack output pythonEndpoint)
"Hello World!"
$ curl $(pulumi stack output goEndpoint)
"Hello World!"
$ curl $(pulumi stack output tsEndpoint)
"Hello World!"

# Remove the app
$ pulumi destroy
```

## TypeScript Notes

In the `typescriptfunc` folder you'll notice more than a function. Some configuration is needed to inform GCP how to build TypeScript for the Node.js runtime environment. See [this example from Google for more details](https://github.com/GoogleCloudPlatform/functions-framework-nodejs/blob/master/docs/typescript.md).
