Custom resource and route

This PR adds support for custom routes and resources through the configuration.