update server.js

add parse function in server/server.js to deal with get/post request
data