macchiato-framework / macchiato-core

Ring style HTTP server abstraction for Node.js
MIT License
379 stars 35 forks source link

dynamic middleware #8

Open yogthos opened 7 years ago

yogthos commented 7 years ago

Proposal to have middleware accept the handler at the time the request is being handled instead of wrapping the handler function in a closure. The middleware could then be kept in a data structure and manipulated at any time.

Need to test to see if there's any significant performance impact.