feat: init

This commit is contained in:
2023-07-26 13:47:01 +02:00
commit 8e461cea26
28 changed files with 732 additions and 0 deletions

11
routes/api/index.ts Normal file
View File

@ -0,0 +1,11 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocuments } from "../../lib/documents.ts";
export const handler = async (
_req: Request,
_ctx: HandlerContext,
): Promise<Response> => {
const documents = await getDocuments();
const response = new Response(JSON.stringify(documents));
return response;
};