Adapted web.js for index running