fix(API): routing logic should be done after request mw

Routing logic should be done after the execution of request middleware. The execution of request middleware
should be aware of routing logic. A logRequest middleware could not be executed if routing fails, or a mw
can not be executed if a routing fails.
Merge pull request #381 from ealogar/bug/routing_after_req_mw

bug(API): routing logic should be done after request mw