Blitz Example

This is an example of how to deploy a Blitz.js application to AWS Fargate using Flightcontrol and the flightcontrol.json configuration as code file.

Prerequisites

Session Secret Key

You’ll need to provide a SESSION_SECRET_KEY environment variable for Blitz Auth.

We suggest adding the session secret key as an environment variable in the Flightcontrol dashboard.

Preview Emails

NOTE: You must do one of the following:

  • move preview-email from devDependencies to dependencies

  • OR make the following change in all your “mailers”

    - import previewEmail from "preview-email"
    ...
    + const previewEmail = (await import("preview-email")).default
    await previewEmail({

Configuration Options

Flightcontrol supports two different configuration options, the dashboard and the flightcontrol.json file. For an example flightcontrol.json file for Blitz, see below.

  1. Connect your project using GitHub
  2. Select a GUI config type
  3. Select your environment
  4. Add a service and set your port to 3000
  5. Add an AWS region
  6. Adjust any configuration as needed.
  7. Click “Create Project” and complete any required steps (like linking your AWS account).