Update web.js

updated to write index.html to buffer and then write it out as a string.