alloc / alien-rpc

🚧 Type-safe RPC with generated runtime validation, REST semantics, and NDJSON streams
1 stars 0 forks source link

Support per-route middleware #5

Open aleclarson opened 6 days ago

aleclarson commented 6 days ago

Perhaps go with an Express-like solution?

export const myRoute = route.get('/my-route', cors(), async () => { … })
aleclarson commented 6 days ago

Note that middleware is already supported with @hattip/compose: https://github.com/hattipjs/hattip/tree/main/packages/base/compose