title: HEROKU Error: ENOENT: no such file or directory, stat '/app/distpublic/index.html'
body: <p>I know there are alot of questions like this on the site but I ihave tried everything i could on this site, the best I could get to work on heroku is to display a text on the browser, I have been struggling with this code for 2 days now, no success, below is my directory layout.
  <a href="https://i.stack.imgur.com/mSCii.png" rel="nofollow noreferrer">image of my directory structure</a></p>
  <p>so below are my code</p>
  <pre><code>app.use(express.static(__dirname + &quot;/public/&quot;));
  
  app.get(&quot;/&quot;, (req, res, next) =&gt; {
      res.sendFile(path.join(__dirname + &quot;public&quot;, 'index.html'));
     
      //res.send('Testing one two');
  });
  
  const port = process.env.PORT || '5000';
  app.listen(port, () =&gt; console.log(&quot;Server running on port 5000&quot;));
  </code></pre>
  <p>when I run this code on my machine it works well, in fact there are close to 5 ways and could change the code and it still works on my machine, but not on heroku, the best I have gotten horoku to work is just to display a text. i need on how to make this work, it been more than 2days now, I don't even understand the directory not found in the error msg</p>