Launch Quick Start Guide with React

View as Markdown
Intermediate3 min readLast updated November 23, 2026

The fastest way to get started with Launch is to clone and deploy a sample ReactJS 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 a ReactJS project.

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

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

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 ReactJS 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): CSR (Client-Side Rendered).
    • Output Directory (required): ./dist.
    • Build Command: npm run build.
    • 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.

    Click to enlarge

  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 ReactJS Starter to work, add the following environment variables:

    VITE_CONTENTSTACK_LIVE_PREVIEW=<true_or_false>
    VITE_CONTENTSTACK_PREVIEW_TOKEN=<preview_token>
    VITE_CONTENTSTACK_PREVIEW_HOST=<preview_host_value>
    VITE_CONTENTSTACK_APP_HOST=<app_host_value>
    VITE_CONTENTSTACK_API_HOST=<api_host_value>
    VITE_CONTENTSTACK_REGION=<region>
    VITE_CONTENTSTACK_ENVIRONMENT=<environment_name>
    VITE_CONTENTSTACK_API_KEY=<api_key_of_your_stack>
    VITE_CONTENTSTACK_DELIVERY_TOKEN=<delivery_token_of_the_environment>

    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.