Setting a route to get a json file for all posts