/** * Server entry. * * Note the `path` **attribute** binding below rather than a `.path` property * binding. Attributes are serialised into the HTML the browser receives, so * the element picks the value up automatically when it upgrades. A property * binding would exist only on the server, leaving the client to hydrate with * a different value than was rendered. */ import { html } from 'lit'; import { render, type RenderResult } from '@lit-labs/ssr'; import './components/app-root.js'; export function renderApp(url: string): RenderResult { // `url` is a request target such as "/about?q=1"; only the path routes. const { pathname } = new URL(url, 'http://localhost'); return render(html``); } export { routeExists } from './routes.js';