Deploying a project
The deploy
command allows you to deploy your Dart application to Globe directly from the command line.
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
-
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). -
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). -
Run globe deploy:
- For a preview deployment (recommended for testing):
globe deploy
- For a production deployment (to your live application):
globe deploy --prod
- For a preview deployment (recommended for testing):
-
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). -
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.
-
Access your deployment: Once the deployment is complete, the CLI will display a URL where you can access your application.