Routes
Each Elm file maps to a URL. Index.elm is the folder root, a trailing underscore marks a dynamic segment, and NotFound.elm is the fallback.
Route modules render to HTML on the server.
Islands add client state only where the page needs it.
Each Elm file maps to a URL. Index.elm is the folder root, a trailing underscore marks a dynamic segment, and NotFound.elm is the fallback.
A Loader describes what the page needs from the server — SQL, cache, fetch, env, session. The Worker runs it and resumes Elm with the decoded result.
Pages without island markers serve pure static HTML. Add an elm-ssr-island marker only where you need client state, subscriptions, or browser events.
Scaffold an app, build the generated router, and deploy to Cloudflare Workers.
bun elm-ssr new <name>
bun elm-ssr build
wrangler deploy
Runtime pulse
A route returns a Document. If that document contains no island marker, elm-ssr does not add the island script.