Transform hierarchically structured routes into express routes.