Create an app for the App Engine Flexible Environment in Cloud Code for IntelliJ

Stay organized with collections Save and categorize content based on your preferences.

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale.

This document describes how to create an application (or import an existing project) for the App Engine flexible environment with Cloud Code.

Before you begin

  • Install and set up JetBrains IDE version 2021.3+ (IntelliJ Ultimate or Community) on the PATH of your machine.
  • Install the Cloud Code plugin:

    • Open IntelliJ IDEA (or any supported JetBrains IDE).
    • From your plugins marketplace (File > Settings > Plugins or for Mac OS X, IntelliJ IDEA > Preferences > Plugins), search for the 'Cloud Code' plugin and install it.

    You may be prompted to restart your IDE to activate the plugin.

Creating a new application

You can create a new application by using the new project wizard or by importing an existing project in Cloud Source Repositories.

Using the new project wizard

To create a new project, you can use the IntelliJ New Project wizard to generate a template application as the start for your own application.

Create a new project as follows:

  1. Choose File > New > Project to display the New Project dialog.

  2. If you're using IntelliJ Ultimate version 2021.3, choose Java in the left panel. Otherwise, for versions 2022.1+, choose Java FX (Legacy).

  3. In the Additional Libraries and Frameworks section, check the Google App Engine box for your environment.

    New Java project with 'Google App Engine Flexible' selected within Additional Libraries and Frameworks.

  4. If needed, select the Create app.yaml checkbox.

  5. Click Next.

  6. Enter a Project name.

  7. Enter a Project location if you do not want to keep the default.

  8. Update the fields in the More Settings section if you do not want to keep the defaults.

  9. Click Finish.

Checking out an existing project

You can check out your existing project in Cloud Source Repositories:

  1. Choose VCS > Get from Version Control....

  2. Select Google Cloud from the Version Control dropdown and click Clone.
  3. In the Clone from Google Cloud dialog, select the Cloud Project associated with your project.
  4. Select your Cloud Repository.
  5. Select the Parent Directory.
  6. Enter the Directory Name.
  7. Click Clone.

Adding framework support

If you never added framework support to your application, IntelliJ IDEA prompts you to configure the framework after detecting that you opened an App Engine application.

  1. Right click the project.

  2. Choose Add Framework Support.

  3. Select the App Engine flexible checkbox.

    Alternatively, you can add App Engine framework support through the Cloud Code menu:

    1. Select Tools > Cloud Code > Add App Engine support > Google App Engine flexible.

    2. Select the module you want to add framework support to.

    3. Click OK.

  4. If needed, select the Create app.yaml checkbox.

  5. Click OK.

What's next

Now that you've created an application, you can deploy it to the App Engine flexible environment.

Get support

To submit feedback or report an issue in your IntelliJ IDE, go to Tools > Cloud Code > Help / About > Submit feedback or report an issue to report an issue on GitHub, or ask a question on Stack Overflow.

You can also join the #cloud-code channel, which is part of the Google Cloud Slack community.