From e6cdf3a9779a5a5406e93ac38caecd61340b69ca Mon Sep 17 00:00:00 2001 From: Caleb Braaten Date: Tue, 30 Jan 2024 17:47:39 -0800 Subject: [PATCH] Add Request Logger to Console --- src/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 19ad78e..1e4122a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,6 +4,9 @@ import { Index } from "./frontend/index"; const app = new Elysia() .use(html()) + .onRequest(({ request }) => { + console.log(`Request ${request.method} ${request.url}`); + }) .get("/", () => Index()) .get('/htmx.min.js', () => Bun.file("./src/frontend/htmx.min.js")) .get("/content/post", () => "I'm from the server")