Updated web.js to send response from buffer