Launch Quick Start Guide with Angular

View as Markdown
Intermediate4 min readLast updated November 23, 2026

The fastest way to get started with Launch is to clone and deploy a sample Angular Starter project. With Launch, you can easily create a project by importing your website code from GitHub.

Prerequisites

What You Will Learn

  • How to import a GitHub repository into Launch.

  • How to configure build and output settings for an Angular project.

  • How to add the environment variables the Angular Starter requires.

  • How to deploy the project and preview the live site.

  • How to deploy Angular as a server-side-rendered application.

Steps for Execution

Follow the steps given below to deploy your first Launch project using GitHub:

  1. Sign in to Contentstack and click the Launch icon from the dashboard. Alternatively, go to the App Switcher in the top panel and click the Launch icon.

  2. On the Launch Dashboard, click New Project, and then select GitHub.

    Click to enlarge

    Note You can also import a project using a .zip file by selecting File Upload, or create a project using Bitbucket Cloud by selecting BitBucket.

  3. If you are connecting GitHub to Launch for the first time, a GitHub page opens. Sign in to your GitHub account, and then authorize Contentstack:

    1. In the Repository access section, select All repositories, or select Only select repositories and choose the repositories you want to deploy.
    2. Click Install & Authorize.

    You are redirected to Launch.

    Note We have assumed that you have a GitHub account and your website code stored in the repository.

  4. In the Deploy Your New Project panel, under Choose Repository, select your repository. In our example, we have selected the Angular Starter App repository.

    Click to enlarge

    Tip Importing via shows the GitHub account in use. To use another GitHub account, click Manage Accounts.

  5. Enter the project details:

    1. Git Branch: In Importing from, main or master is selected by default. You can choose another branch from the dropdown.
    2. Project Name (required): Gets auto-populated on selecting the repository. You can edit it as per your requirement.
    3. Environment Name: Enter the name of the environment.

    Click to enlarge

  6. Review the build settings. When you select the repository, Launch detects the framework and fills in the following fields:

    • Framework Preset (required): Angular.
    • Output Directory (required): ./dist.
    • Build Command: npm run build.
    • Server Command: Blank by default.
    • Response Mode: Streaming delivers response chunks in real time as they are generated. Buffered displays output only after the entire response has been generated. Buffered is selected by default.

    For the Angular Starter App, update the Output Directory to ./dist/contentstack-angular-starter-app.

    Click to enlarge

    Note

    • The Server Command field allows you to deploy Angular as Server-Side Rendered.
    • Leaving the Server Command field blank deploys the framework as CSR (Client-Side Rendered).
  7. Enable Contentstack Authentication is turned on by default, so only members of your Contentstack organization can access the environment. To make the site publicly accessible, turn off the toggle. For details, see Contentstack Authentication.

    Click to enlarge

  8. (Optional) Expand Environment Variables to add environment variables:

    • Click Add Environment Variable and enter the key and value.
    • To add several key-value pairs at once, click Switch to Text Editor.
    • To import variables from a stack, use Stack Integration.

    For the Contentstack Angular Starter to work, add the following environment variables:

    CONTENTSTACK_LIVE_PREVIEW=<true_or_false>
    CONTENTSTACK_PREVIEW_TOKEN=<preview_token>
    CONTENTSTACK_PREVIEW_HOST=<preview_host_value>
    CONTENTSTACK_DELIVERY_TOKEN=<delivery_token_of_the_environment>
    CONTENTSTACK_API_HOST=<api_host_value>
    CONTENTSTACK_REGION=<region>
    CONTENTSTACK_APP_HOST=<app_host_value>
    CONTENTSTACK_API_KEY=<api_key_of_your_stack>
    CONTENTSTACK_ENVIRONMENT=<environment_name>

    Click to enlarge

  9. Click Deploy.

    Note Click Back to revert the changes and re-enter details.

The deployment page opens and shows the deployment status. To stop a deployment that is in progress, click Cancel Deployment.

Upon successful deployment, the status changes to Live. You can preview the deployed website by clicking the icon next to the URL in the Domains section:

Click to enlarge

If you want to deploy the changes from any other commit, click Redeploy, select the commit from the Commit dropdown, and then click Redeploy.

Click to enlarge

Note View the log details of the current deployment in the Logs section, under Deployment Logs and Server Logs.

Angular as an SSR-based Application

By default, Angular is deployed as a Single-Page Application (SPA). To deploy Angular as an SSR-based application, follow the steps below:

  1. In the top navigation panel, click Settings, and then click Environments in the left panel.

    Click to enlarge

  2. Under Select an Environment, select the environment, and then click the Deployments tab.

  3. In the Server Command field, add the command from your package.json file that runs the SSR build locally, such as node dist/my-app/server/server.mjs.

    Note The Server Command field is not shown for every framework preset. It is shown when Angular is the selected framework.

  4. Click Save Deployment Settings.

    Click to enlarge

  5. Redeploy the environment with the latest updates.

    1. In the top navigation panel, click Environments, and then click the environment where the updates are made.
    2. On the deployment page that appears, click Redeploy.

Once deployed, your application starts rendering pages on the server. You can inspect and verify the application content for accuracy.