Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
2
pomdtr avatar

This is incredible!

It would be nice to implement this as a universal middleware in addition to the hono one. Not sure how to pass the context though.

postpostscript avatar

@pomdtr Thank you! There's an undocumented wrapper (it that's what you mean) authWrapperCookie which passes the context as a second argument to the request handler. I need to look at the other recommended HTTP endpoint libraries in the docs to see if I can improve the DX for those too!

Updated: March 7, 2024