App: automatically discover middleware, no more hardcoding mw list
Support static middleware