title: Crostini - Node server doesn't work on localhost
body: <p>I have a Pixelbook on Chrome 79. In my terminal (Crostini), I run a simple Express app:</p>
  
  <pre><code>const express = require('express');
  const app = express();
  
  app.get('/', (req, res) =&gt; {
      res.send('Hello!');
  });
  
  const PORT = 8080;
  
  app.listen(PORT, () =&gt; console.log(`Listening on port ${PORT}...`));
  </code></pre>
  
  <p>And try it in the browser at <code>localhost:8080</code> and I get the <code>localhost refused to connect</code> error.</p>
  
  <p>If I use the Angular CLI tool to make a boilerplate Angular project and use <code>ng serve</code>, it tells me it's listening at <code>localhost:4200</code> - which I try and it <strong><em>does</em></strong> work.</p>
  
  <p>What's the difference? How do I get my app to work on localhost?</p>
  
  <p>I feel like I had this working the last time I tried it a couple months ago and now it's just not working and I can't tell why. I've tried using other ports and restarting my computer and nothing changes. </p>
  
  <p>Edit: I've seen Google demo that the port forwarding should work automatically here: <a href="https://youtu.be/pRlh8LX4kQI?t=1160" rel="nofollow noreferrer">https://youtu.be/pRlh8LX4kQI?t=1160</a> - but it doesn't seem like it is for me.</p>
  
  <p>Edit 2: If I find the IP of my container with <code>ip addr show | grep inet</code> (for me it was 100.115.92.199) and try that at port 8080 it works. Also, I found someone on Reddit reporting the same issue (<a href="https://www.reddit.com/r/Crostini/comments/edgci0/did_localhost_stop_working_for_anyone_else/" rel="nofollow noreferrer">link</a>). So I think the automatic port forwarding is broken.</p>