Creating a new application from a custom template

Once you've set up your template repository (or one has been set up for you), you can start creating applications with these templates.

Alternatively, you can import the Cloud Code custom template sample repository if you'd just like to try out the custom template experience. To better understand how custom template repositories are set up, it is recommended that you try forking the repository and modifying its structure and content before importing it. You can do this by creating new templates within the repository or modifying the source code to create your own versions of the Hello World or Kubernetes Custom Template apps.

Creating your app from an imported template

To create a new application using one of the templates from your template repository, follow these steps:

  1. Copy the Git URL of the template repository that you'd like to use.

  2. From the Cloud Code status bar menu, select New Application.

  3. Select the Custom Application option when prompted for the type of sample you'd like to use.

    Custom application option available when prompted for type of sample you'd like to use

  4. Select Import Template from Repo.

    Import template from repo option available when prompted for a template to use

  5. Enter the Git URL you copied earlier when asked for the URL.

    The URL in this example is of the HTTPS GitHub format: https://github.com/username/repo-name.git.

    Git URL field filled with HTTPS format URL of https://github.com/username/custom-templates.git

    Troubleshooting tip: If you're having trouble with Git authentication, ensure VS Code's built-in Git extension is enabled (search for @builtin git) and the Git: Terminal Authentication setting in your User settings is checked.

  6. Check the terminal window in your IDE to confirm your repository has been cloned successfully.

    The repository's default branch is automatically used. You can edit the branch in use or the repository URL in your settings.json, amending the custom template's details under cloudcode.customTemplates.

    If your repository wasn't cloned successfully, you can use the Manage Repositories option to update your template repository details with a valid Git URL and/or branch.

  7. From the list of updated templates, select the one you'd like to use.

    List of available custom templates to choose from; Basic Application and Template with Long Description

  8. Fill in your project name and location in the resulting dialog and click Create New Application.

    Cloud Code creates your app using your chosen template and opens it for use.

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.