Moving the express view path override into a middleware