View rendering middleware for koars