Documentation

Routing

Updated
Browse documentation

Published 2026-08-13. V2 is a prerelease; the web core is release-gated and other previews are named separately. What beta means.

Read this page as HTML, Markdown, or structured JSON—or open the published Markdown with an AI assistant. Gemini receives the prompt through your clipboard because its signed-out page does not reliably prefill URL text; paste when the new tab opens. External assistants need the public site URL.

Routing

Amber compiles the routes in config/routes.cr. Each route selects a pipeline, matches an HTTP method and path, then dispatches to a controller action.

The generated V2 web application starts with separate web and static pipelines. Keep that separation: request/session behavior belongs to the web pipeline, while files under public/ are served through the static pipeline.

  • Pipelines — compose request handlers in execution order.
  • Routes — map paths, resources, namespaces, and constraints.

Run amber routes from the project root to inspect the routes declared in config/routes.cr. The compiler and request specs remain the source of truth for whether those routes dispatch successfully.