Error: ENOENT: no such file or directory, stat '/public/main.html' at Error (native)
<p><img src="https://i.stack.imgur.com/yT94K.png" alt=""></p>

<p>This is my <code>server.js</code> file:</p>

<pre><code>var express = require('express'),
    app = express();  
app 
    .use(express.static('./public'))
    .get('*',function (req,res) {
        res.sendfile('/public/main.html');
        })
 .listen(3000);
</code></pre>

<p>This is my <code>main.html</code>:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;titel&gt;Contacts&lt;/titel&gt;
    &lt;base href'/'&gt; 
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class="container"&gt;
         &lt;div class="page-header"&gt;
             &lt;h1&gt;Contatcs&lt;/h1&gt;
         &lt;/div&gt;
        &lt;/div&gt; 
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And the folder structure:</p>

<p><img src="https://i.stack.imgur.com/qynSL.png" alt=""></p>