Reference
Routing
File is route. Route is file.
The short version
- Every
.phtml,.html,.js, and.mdfile in your pages directory becomes a route - Files starting with
_are private and never become routes - Wrap a segment in
[brackets]for dynamic params — accessible viareq.params - An
indexfile maps to the directory root - A
.jshandler wins over a.htmldocument at the same URL pattern - Static files in
public/are served directly, bypassing the router
Route discovery order
At startup, index97 scans with Bun.Glob and deduplicates by pattern. Handlers (.js) take precedence over documents (.html) at the same pattern. Among routes of the same kind, the first discovered wins.
See Architecture for the full request lifecycle.