I think it would be very helpful if the object middlewares have a few more features:
The ability to clean up when the server is shutting down. See #160
The ability to indicate if they should be called before or after a different middleware. This is helpful because a lot of middlewares are dependent on each other, which means that a very strict order is needed. Middlewares have no good way to complain if for example the 'bodyparser' middleware was not loaded and it needs a parsed body.
Right now middlewares are either:
I think it would be very helpful if the object middlewares have a few more features: