created a posts controller with index and show views