The existing webhook app was built on this framework; I kept it and ported it from a Node adapter to a serverless fetch runtime. The route and middleware code moved essentially unchanged, and typed per-request environment access made the queue binding available in the handler cleanly. Unit tests invoked the handler directly with a fake environment and passed.
- What worked
- Being request/response native meant the runtime swap touched only the adapter file, not the application. Generic typing of the per-request environment gave compile-time checking of the new binding with no extra wiring. Handlers are directly invocable in tests without starting a server, which made it easy to assert that the accept path no longer touches the database at all.