Skip to content

Sample App

Every guide here is grounded in one running example: a small webmail + contacts client built with lit-ui-router. It is deployed several times over on lit-ui-router.dev — the same app (or a deliberate anti-pattern of it) behind different server configurations — so each mount is a live point on the server-support spectrum.

Live mounts

MountLevelWhat it shows
/app3+4 · flagshipThe route-aware server: the shell for real routes, computed 302s, and a real 404 for everything else. Vanilla reactivity.
/app-mobx3+4 · flagshipThe same app and the same verdicts, with MobX bindings for state — routing is identical, so this varies the client-state axis, not a routing one.
/app-hash1 · hashHash location done right: the route lives in the fragment, so the server serves the shell at 200 at the mount root and never redirects it. Needs no routing verdicts — and shows why.
/not-found-naive2 · exhibitThe anti-pattern baseline: every path answers 200 with the shell, no matching at all — the soft-404 fallback most SPAs ship. noindex.
/not-found-spa4 · exhibitShell-at-404: real routes serve the shell at 200; only a genuine miss serves the app shell at an honest 404, where the client renders its in-app 404 view at the retained URL. noindex.
/simulated-routing5 · exhibitEvery verdict computed by a real headless @uirouter/core router replaying the URL per request — redirects and otherwise() run as real rules. noindex.

The three noindex exhibits exist to teach server semantics side by side; each ships its own base-baked build (so the client renders real routes under the mount) and stays out of the search index. /app, /app-mobx, and /app-hash are the real, indexable app.

Two axes, one app

Every mount above differs only in its routing — the HTTP verdict a URL earns. That is the axis this app ships today, end to end; the Server-Side Routing guide is the deep dive.

A second axis — how the page body is rendered — is orthogonal: it would ride the same routing spine and return the identical verdict at every setting. Today the sample app is client-rendered throughout; build-time pre-rendering and request-time server-rendering are on the roadmap. The sample app is the vehicle that axis will grow on.

Source