Express middleware for single page app routing