extract routes for index to an individual file