Add Request Logger to Console

This commit is contained in:
Caleb Braaten 2024-01-30 17:47:39 -08:00
parent cc8fe27935
commit e6cdf3a977

View File

@ -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")