$def with (app)
$var title: Debug

<p>Prefix: $app.prefix<br>
Host: $app.host<br>
Port: $app.port<br>
Name: $app.name<br>
SQLite DB: $tx.host.db.path</p>

$tx.app

<h2>Wrappers</h2>
<ul>
$for wrapper in app.wrappers:
    <li>$wrapper</li>
</ul>
<ul>
$for prefix, subapp in app.mounts:
    $if subapp.wrappers:
        $for wrapper in subapp.wrappers:
            <li>$wrapper</li>
</ul>

<h2>Controllers</h2>
<ul>
$for route, controller in app.controllers:
    <li>$route, $controller</li>
</ul>

<h2>Mounts</h2>
<ul id=mounts>
$for prefix, subapp in app.mounts:
    $ prefix = f"/{prefix}/".rstrip("/")
    $if subapp.controllers:
        $for route, controller in subapp.controllers:
            <li>$(f"{prefix}/{route}".rstrip("/"))
            <small><a href=https://understory.stream/api/$("/".join(controller.handler.__module__.split(".")))#$controller.handler.__name__>$controller.handler.__name__</a></small></li>
</ul>

<style>
ul#mounts {
  list-style: none; }
</style>
