title: unable to get a response from the express nodejs server when being directed to a html page
body: <p>When clicking the buttons in my public/index.html I am being directed to game.html but it doesn't show any response. It says <code>This site can’t provide a secure connection: localhost sent an invalid response.</code> The index.html page is loaded when I go to localhost:3000 and after clicking on the buttons I am being directed to game.html but the server doesn't load the page.</p>
  
  <h2>public/index.html</h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!-- HTML --&gt;
  &lt;button class="w3-button w3-hover-black"&gt; &lt;/button&gt;
  
  &lt;!-- JavaScript --&gt;   
  &lt;script&gt;
    var buttons=  document.getElementsByClassName('w3-button w3-hover-black');
    for(i=0;i&lt;buttons.length;i++){
      buttons[i].onclick = function(){
      window.location.href = "http://localhost:3000/game.html";
     }
   }
  &lt;/script&gt;
  </code></pre>
  
  <h2>public/game.html</h2>
  
  <pre class="lang-html prettyprint-override"><code> &lt;div id = "gameDiv"&gt;&lt;/div&gt;
   &lt;script src = "/socket.io/socket.io.js"&gt;&lt;/script&gt;
   &lt;script src = "lib/phaser.min.js"&gt;&lt;/script&gt;
   &lt;script src = "main.js"&gt;&lt;/script&gt;
   &lt;script src = "player.js"&gt;&lt;/script&gt;   
  </code></pre>
  
  <h2>server/server.js</h2>
  
  <pre class="lang-js prettyprint-override"><code>var app = express();
  const port = process.env.PORT ||3000 ;
  const pathjoin = path.join(__dirname, '../public'); 
  const pathjoin1 = path.join(__dirname,'../public/game.html');
  var server = http.createServer(app);
  
  app.use(express.static(pathjoin));
  
  app.get('/game.html',(req,res)=&gt;{
    res.sendFile(pathjoin1);
  });
  
  var io = socketIo(server);
  
  io.on('connection',(socket)=&gt;{
    console.log('user connected ' + socket.id);
  });
  </code></pre>