Deploying a Jaspr Application
Jaspr is a modern web framework for building websites in Dart. It supports both client-side and server-side rendering. Globe currently only supports server-side rendered Jaspr applications. This page outlines requirements and deployment behaviour.
Project Setup
To create a new Jaspr project:
-
Install the Jaspr CLI:
dart pub global activate jaspr_cli
-
Create a new Jaspr project:
jaspr create my_jaspr_app cd my_jaspr_app
-
Configure for server-side rendering in your pubspec.yaml:
jaspr: uses-ssr: true
-
Test your application locally:
dart run jaspr serve
Deploying to Globe
Run the deployment command from your project root:
globe deploy
Globe automatically detects Jaspr applications and applies the correct framework preset during deployment. Currently, only server-side rendering mode is supported.
Deployment Behaviour
- Rendering: Only SSR is supported at this time. Client-side mode is not currently compatible with Globe.
- Preset detection: Globe identifies Jaspr projects automatically.
- Build: The server-rendered app is built and deployed without additional configuration.
- Status: Client-side Jaspr applications are not yet supported, but we plan to add compatibility soon.
Jaspr vs Flutter Web
Jaspr is best suited for building static websites, server-rendered, or single page apps using Dart with native web technologies (HTML, DOM, CSS). It brings a Flutter-like structure but embraces the web’s natural rendering model. Flutter Web, in contrast, is optimized for building cross-platform apps and paints UI via a canvas, which may not align well with document-centric or content-heavy websites.