Skip to content

Commit

Permalink
feat(hono): Add logger to the app (#51)
Browse files Browse the repository at this point in the history
It was removed unexpectedly.
  • Loading branch information
5ouma authored Aug 30, 2024
1 parent 78c8949 commit 5cc8d01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type Context, Hono } from "@hono/hono";
export type { Hono };
import { logger } from "@hono/hono/logger";
import { STATUS_CODE } from "@std/http/status";
import { UserAgent } from "@std/http/user-agent";

Expand All @@ -20,6 +21,7 @@ import { checkRedirect, getContent } from "./libs/mod.ts";
* ```
*/
export const app: Hono = new Hono();
app.use(logger());
app
.get("/:ref?", async (ctx: Context) => {
const ref: string = ctx.req.param("ref");
Expand Down

0 comments on commit 5cc8d01

Please sign in to comment.