index.html works as expected but server.js does not