natchez-http4s icon indicating copy to clipboard operation
natchez-http4s copied to clipboard

Trace 404

Open mwisnicki opened this issue 9 months ago • 2 comments

Currently server middleware is defined on HttpRoutes so it has to be applied before .orNotFound and it would not run if route is not found.

I think it should default to HttpApp with HttpRoutes provided as an alternative for more complex integrations.

mwisnicki avatar Mar 17 '25 19:03 mwisnicki

I think we should have .httpApp and .httpRoutes here, like in some "built in" http4s middlewares.

just checked and it's server, IMO that one could be deprecated and replaced with the above two. Feel free to PR it in

kubukoz avatar Mar 21 '25 11:03 kubukoz

FYI, the mtl module defines methods that work this way in EntryPointOps.

bpholt avatar Mar 21 '25 12:03 bpholt