API Endpoints
You can build JSON routes with Mochi.api().
+
Click an endpoint to test it
<script>
import ApiTester from './ApiTester.svelte';
</script>
<ApiTester mochi:hydrate />
More demos
Image: Invalidation How image invalidation works — invalidateImage() hard-evicts the shared original so every named size re-fetches in lockstep. Hello World How server-side rendering works — a Mochi.page() renders Svelte on the server and ships zero JavaScript. Server Props How server props work — pass fresh per-request data into a page via serverProps on Mochi.page().