13 lines
288 B
TypeScript
13 lines
288 B
TypeScript
|
import { log } from "~/lib/server/logger";
|
||
|
|
||
|
export default eventHandler(async (ev) => {
|
||
|
log.profile("request");
|
||
|
ev.node.res.on("close", () => {
|
||
|
log.profile(
|
||
|
`{${
|
||
|
ev.context.currentUser?.username || "guest"
|
||
|
}} | ${ev.method.toLocaleUpperCase()} @ ${ev._path}`,
|
||
|
);
|
||
|
});
|
||
|
});
|