import { Head } from "$fresh/runtime.ts"; import { PageProps, Handlers, HandlerContext } from "$fresh/server.ts"; import DocSearch from "../../islands/DocSearch.tsx"; import { Doc } from "../../src/collect.ts"; import { docCollector } from "../../src/store/doc.ts"; async function GET(req: Request, ctx: HandlerContext): Promise { const docs = docCollector.getDocs(); return await ctx.render({docs}); } export const handler: Handlers = { GET, } export default function Docs(props: PageProps<{docs:Doc[]}>) { const {docs} = props.data; return ( <> Simple file server - Doc
); }