Skip to content
Luis Eduardo Brito edited this page Sep 4, 2013 · 1 revision

The router is the class responsible for mapping the API Routes, the Policies, forwarding the HTTP requests to its specified controllers and handle connection errors, such as if the page was not found (404).

Its implementation is a little bit messy and hard to understand, better keep untouched. It uses the async npm module to forward the request through the Policies and then handle its error or forward again one last time: to the controller.

Clone this wiki locally