kwhitley / itty-router

A little router.
MIT License
1.8k stars 79 forks source link

fix express.js example #247

Closed Livshitz closed 6 months ago

Livshitz commented 6 months 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 6 months ago

Thanks, Elya! <3