Replies: 1 comment 19 replies
-
I made this fork as a first attempt at this task: https://github.com/bever1337/itty-worker-router Instead of testing if any handlers MIGHT match, this fork uses a greedy router. Any returned value from a handler is considered a match. This is a small but also huge design change from the current itty so I'm interested to hear what folks think. Is there a way to bring some sync testing to itty without completely changing its design? Thanks! |
Beta Was this translation helpful? Give feedback.
19 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a service worker environment, it is required to synchronously decide to respond to a fetch event. What is the recommendation when an itty router may not always respond to a fetch event? Because of the getter, I'm not sure how to safely hack on the router and manually test matches. Thankfully the source code could fit on an index card so I'm not afraid to fork. Thanks for the awesome lib.
Beta Was this translation helpful? Give feedback.
All reactions