Added unit test for web/server.js and fixed found errors