Edited web.js to adapt to the new version of node which does not carry middleware automatically