File Routes
You can serve a file straight from disk with Mochi.file() — pass a static path, or a resolver that picks the file per request from the route params. The file is read fresh on every request, so files written or deleted at runtime are picked up immediately. Missing files (or a resolver that throws error(404)) come back as a plain-text 404.
<script>
import FileViewer from './FileViewer.svelte';
</script>
<FileViewer mochi:hydrate />
More demos
Captcha Styling How captcha theming works — the same captcha four ways, every colour a CSS custom property with a built-in fallback. Tailwind Todo App Classic todo app styled with Tailwind CSS. Request Cache How the request cache works — requestMemo and requestCache run an expensive computation once per request no matter how many components call it, then discard it at the request boundary.