title: How to specify the path for static files (such as JS, CSS, images etc) in the server code (Node)?
body: <p>I am working with Node to create a webpage. This webpage will have Javascript files linked to the webpage or HTML file, but every time I try to open my webpage on the remote machine nothing shows up on the remote machine browser. So, after searching online for more information, I learned that you need to let the Node server know where the static files are. So, it can load or serve to the remote machine. For the life of me, I can't get this to work.</p>
  <p>I tried this. <code>app.use(express.static('public');</code> It didn't work. Then, <code>app.use(express.static(__dirname + 'public'));</code> Still nothing works.</p>
  <p>I looked in the browser's console and I noticed the following errors.</p>
  <p><a href="https://i.stack.imgur.com/q0nOS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q0nOS.png" alt="enter image description here" /></a></p>
  <p>Any clues or hints will be greatly appreciated. Thanks.</p>