Updated web.js to read from file using a buffer