Setup middleware to getPosts and single page post