Replies: 1 comment
-
Based on the docs, there is no 1:1 equivalent to this. const idMw = createMiddleware(async (c, next) => {
const id = 1029;
c.set("id", id);
await next();
});
app.use("/api/:id", idMw);
app.get("/api/:id", async c => {
const id = c.get("id");
return c.json({ id });
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how do we do route model binding in hono?
express example: https://www.codementor.io/@mirko0/express-js-route-model-binding-wris4hd2m
Beta Was this translation helpful? Give feedback.
All reactions