kwhitley / itty-router

A little router.
MIT License
1.69k stars 77 forks source link

fix express.js example #247

Closed Livshitz closed 1 month ago

Livshitz commented 1 month ago

Should be using createServerAdapter adapter to convert to express-compatible handler. Based on this issue conversation: https://github.com/kwhitley/itty-router/issues/246#issuecomment-2110506175

Description

v5 changes created regression in the way express handled router.handle. The right way is anyway to use createServerAdapter (from @whatwg-node/server) to make itty's router express-compatible.

Related Issue

Link to the related issue: https://github.com/kwhitley/itty-router/issues/246#issuecomment-2110506175

Type of Change (select one and follow subtasks)

kwhitley commented 1 month ago

Thanks, Elya! <3