server is complete before refactoring

server can handle both post and get requests