implemented get and post requests with express.