feat: add logging

This commit is contained in:
2023-08-13 02:26:22 +02:00
parent 59ddcb64a6
commit 830b33462d
9 changed files with 266 additions and 114 deletions

14
routes/api/logs.ts Normal file
View File

@ -0,0 +1,14 @@
import { Handlers } from "$fresh/server.ts";
import { createStreamResponse } from "@lib/helpers.ts";
const activeResponses: ReturnType<typeof createStreamResponse>[] = [];
export const handler: Handlers = {
GET() {
const r = createStreamResponse();
activeResponses.push(r);
return r.response;
},
};