moving router instance creation and route applying to route.js