title: Static HTML file directory can't be found in AWS Lambda express.js server
body: <p>I am trying to serve a static HTML file using the <code>res.sendFile()</code> method from my express.js server that is hosted on AWS Lambda using the <code>Serverless</code> framework. Assuming that I am trying to serve an HTML file from the directory <code>src/views/users/index.html</code>.</p>
  <p>In deployment, this is the file path that I have tried to serve my HTML file from <code>/var/task/src/views/users/vindex.html</code>, but I keep getting the error <code>Error: ENOENT: no such file or directory, stat '/var/task/src/views/users/index.html'</code> when viewing the AWS Cloudwatch log.</p>
  <pre class="lang-js prettyprint-override"><code>    app.use(express.static(__dirname));
      path.resolve(__dirname, &quot;./src/views/users/index.html&quot;);
  </code></pre>
  <p>This is the results I get when I run <code>tree src</code> locally:</p>
  <p><a href="https://i.stack.imgur.com/YGqXG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YGqXG.png" alt="enter image description here" /></a></p>
  <p>Have anyone experienced this issue before, and have solved it? Thank you so much!</p>