Abstracting out the path of the API endpoint to the controller, and making the initial load of posts configurable from the front end as well