Skip to content

Commit

Permalink
update dev example
Browse files Browse the repository at this point in the history
  • Loading branch information
ragokan committed Sep 25, 2024
1 parent 50edf34 commit d38e710
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server/src/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Router } from "./router/base.ts";
const loggerMiddleware = createMiddleware(async (_, next) => {
console.log("Request received.");
const response = await next();
console.log("Response sent with status:", response.status);
// If you use "response", you need to clone it before using it.
console.log("Response sent with body:", await response.clone().text());
return response;
});

Expand Down

0 comments on commit d38e710

Please sign in to comment.