## Demo: mdsvex ### Greeting.md ```svelte ## Hello, {name}! This block was authored in **Markdown** but compiled into a Svelte component via [`mdsvex`](https://mdsvex.pngwn.io/), so prose, _emphasis_, `inline code`, and a normal Svelte ` ### A `.svx` file Same compile pipeline as `.md` — mdsvex accepts both extensions. This snippet shows a fenced code block (run through the framework's syntax highlighter) plus a Svelte `{#each}` loop driven by a prop: ```ts const items = ['Hydration', 'CSS imports', 'MdSvex']; ```
    {#each items as item}
  1. {item}
  2. {/each}
``` ### MdsvexDemo.svelte ```svelte

``` ### routes.ts ```ts import { Mochi } from 'mochi-framework'; import type { MochiRouteValue } from 'mochi-framework'; export const routes: Record = { '/demos/mdsvex': Mochi.page('./src/demos/mdsvex/MdsvexDemo.svelte'), }; ``` ### index.ts ```ts import { Mochi, logger } from 'mochi-framework'; import { routes } from './routes'; await Mochi.serve({ port: 3333, development: process.env.MODE === 'development', routes, }); logger.info('Server running at http://localhost:3333'); ```