updates app to return json response from database to the client