Reference
Blitz.js

Blitz.js Example

If you are using the Blitz.js (opens in a new tab) framework with Flightcontrol, this flightcontrol.json example will help you deploy your web application with Flightcontrol.

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({
{
  "environments": [
    {
      "id": "production",
      "name": "Production",
      "region": "us-west-2",
      "source": {
        "branch": "main"
      },
      "services": [
        {
          "id": "my-blitz",
          "name": "My Blitz",
          "type": "fargate",
          "cpu": 0.25,
          "memory": 0.5,
          "domain": "www.example.com",
          "minInstances": 1,
          "maxInstances": 1,
          "buildCommand": "blitz build && blitz prisma migrate deploy",
          "startCommand": "blitz start",
          "envVariables": {
            "APP_ENV": "production",
            "DATABASE_URL": {
              "fromService": {
                "id": "db",
                "value": "dbConnectionString"
              }
            }
          }
        },
        {
          "id": "db",
          "name": "Database",
          "type": "rds",
          "engine": "postgres",
          "engineVersion": "12",
          "instanceSize": "db.t4g.micro",
          "storage": 20,
          "private": false
        }
      ]
    }
  ]
}