cs-icon.svg

Host any SSR Framework on Launch

By using Contentstack Launch, you can host any SSR framework built on Node.js. In addition to the supported SSR frameworks, namely NextJS, Gatsby, and Angular-SSR, Contentstack Launch also facilitates the deployment of projects built on frameworks that are not supported by Launch, as long as it runs a Node.js server.

Note: Although Launch is built to support a wide array of Javascript frameworks, Contentstack may be limited to provide troubleshooting guidance for your specific application code. Please review our documentation carefully.

This step-by-step guide lets you host an SSR site on Launch.

Prerequisites

  1. Contentstack account
  2. Access to Launch for your organization

Steps for Execution

Follow the steps given below to host an SSR site on Launch:

  1. Log in to Contentstack and click the Launch icon from the left navigation panel, as shown below:Launch_New_LeftNav_Hover.png
  2. On the Launch Projects screen, click the + New Project button to initiate the project creation process.Launch_Landing_Page_2024Latest.png
  3. Select Import from a Git Repository or Upload a file as usual from the Create New Project modal.
  4. In the Create New Project modal, add the following details:

    1. Repository (Mandatory): Select the repo that contains the app that you want to deploy.

      Note: When you select the repo, the Build and Output Settings section gets auto-populated.

    2. Git Branch (Mandatory): By default, master or main is selected as the branch. You can choose another branch from the dropdown.

      Note: This field will be displayed only if you choose Import from a Git Repository to deploy your project.

    3. Project Name (Mandatory): Gets auto-populated on selecting the repository. You can edit it as per your requirement.
    4. Environment Name (Mandatory): Enter the name of the environment.
    5. Build and Output Settings (Mandatory): The fields in this section get auto-populated based on the selected framework, as discussed above. Update the fields to the following:
      1. Framework Preset (Mandatory): Select Other as the framework from the dropdown.
      2. Build Command (Mandatory): Enter a command to build the project.
        For example, npm run build.
      3. Output Directory (Mandatory): Enter a directory path to store the project’s build output files.
        For example, ./build.
      4. Server Command (Mandatory): A command required to start the SSR server.
        For example, npm run start.

        Note: This is the same command you would use locally to start a production-ready server. Please ensure you do not use a command that starts the framework in developer mode, as this will impact its performance.

        Launch_SSR-Framework_CreateModal_Latest_Link.png

      Note: Launch expects the framework to use the environment variable PORT for determining the port on which the server should start.

    6. Environment Variables (Optional):
      1. Enter the key and value of one or more environment variables.
      2. You can also add the key-value pairs in bulk in the Bulk Edit section.

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

  5. Once ready, click Deploy to save and deploy the project.

Upon successful deployment, you will see the following screen.

Launch_SSR-Framework_Deployed.png

Was this article helpful?
^