using express middleware for pages