Create GET and POST routes for posts.