What problem does it solve?
You need a production-ready HTTP layer for your Serverpod project, including REST endpoints and web content delivery, without bolting together separate routing, middleware, and static/SPAs hosting.
Core Features & Use Cases
- REST route handling with shared server Session: Build custom routes by extending
Route and implementing handleCall(Session, Request) while reusing the same database, logging, and auth context.
- Middleware, request context, and routing controls: Apply middleware to path prefixes, pass request-scoped values with
ContextProperty, and use method restrictions and path/query parameter parsing.
- Web delivery for HTML, SPAs, and Flutter web: Serve static assets, server-rendered Mustache templates,
SpaRoute with index fallback, and FlutterRoute for Flutter web builds with sensible caching and optional WASM headers.
Quick Start
Use the serverpod-webserver skill to add a route by creating a Route subclass, then registering it on pod.webServer (the optional webServer listener) before pod.start().