build POST and GET routes