Cloud Run Hello World with Cloud Code

This "Hello World" is a Cloud Run service that renders a webpage.


Table of Contents


VS Code Guide

VS Code Getting Started

This sample demonstrates how to use the Cloud Code extension in VS Code.

VS Code Running on Cloud Run

  1. Open the command palette
  2. Run Cloud Code: Deploy to Cloud Run

IntelliJ Guide

IntelliJ Getting Started

This sample demonstrates how to use the Cloud Code extension in IntelliJ.

IntelliJ Running on Cloud Run

  1. Enable Cloud Run support on your project. In the Console, use the navigation menu to access APIs and Services > Dashboard. Click on Cloud Run API within the list of available APIs and click Enable API.
  2. Choose the automatically created run configuration, Cloud Run: Deploy from the Run/Debug configurations dialog on the top taskbar.
  3. Click Run run action icon. This brings up the Edit configuration window.
  4. Set your Google Cloud project ID.
  5. Choose a region for your deployment platform.
  6. Click Run.

Service Configuration

Configuration for this service uses environment variables.

  • PORT [default: 8080] The service binds this port. To avoid conflicts, set explicitly this environment variable to an unused value.

Next Steps