How can I add access log middleware? #566
Unanswered
yardenshoham
asked this question in
Q&A
Replies: 1 comment 3 replies
-
you can add a middleware for that, for example: import { serve } from "aleph/server";
serve({
/// ...your config,
middlewares: [
{
name: "logger"
fetch: async (req,ctx) => {
await ctx.next()
console.log(req.url)
}
}
],
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Like morgan
Beta Was this translation helpful? Give feedback.
All reactions