Getting Started

Infrastructure

Deploying a project

The deploy command allows you to deploy your Dart application to Globe directly from the command line.

Usage

globe deploy [flags]

Flags

  • --prod: Creates a production deployment. Without this flag, a preview deployment is created.
  • --logs: Streams the build logs to your terminal.
  • --project: Specify a project ID or name (useful for monorepos or when you have multiple linked projects).
  • --help, --verbose, --token: (See "Global Flags" above)

Workflow

  1. Navigate to your project directory: Open your terminal and go into the root directory of your Dart project (the directory containing your pubspec.yaml file).

  2. Link your project (if not already linked): If this is the first time you're deploying this project, run globe link. This will guide you through the process of linking your local directory to a Globe project (either an existing project or a new one).

  3. Run globe deploy:

    • For a preview deployment (recommended for testing):
      globe deploy
      
    • For a production deployment (to your live application):
      globe deploy --prod
      
  4. Follow the prompts: The CLI may prompt you for confirmation or to select a project (if you have multiple linked projects and haven't used the --project flag).

  5. Wait for deployment: The CLI will package your code, upload it to Globe, build your application, and deploy it. You'll see progress updates in the terminal.

  6. Access your deployment: Once the deployment is complete, the CLI will display a URL where you can access your application.

Examples

Preview Deployment:

cd my_dart_project
globe deploy

Production Deployment:

cd my_dart_project
globe deploy --prod

Deploying a specific project in a multi-project directory:

cd my_monorepo
globe deploy --project="my-backend-project"