Added a generic way to activate routes from api.js in app.'s