Bidi would be the way
Well, isn’t routes function already doing that?
You need to call bidi to make a handler from your routes.
Frankly, I’m a bit lost regarding the architecture… Although have read the complete Yada manual.
Have a look to see how Edge does this, but basically you pass a bidi structure to http server
after calling yada/handler on it 😄