title: Behaviour of node in local and prod
body: <p>I have a basic nodejs server serving static files. It works very well in local tests.</p>
  
  <p>However, I hosted it on a google cloud instance. Set up a nginx server. Accessing the page works fine.</p>
  
  <p>The problem is that some included js files in the html page are not found when accessing the page from the google hosted server. I checked the code/file, it is the same as the one used in local tests.</p>
  
  <pre><code>let express = require('express');
  var app = express();
  app.use(express.static('public'));
  app.get('/',function(req,res){
  
      res.sendFile(__dirname + '/main.html');
  
  });
  
  app.listen(8080);
  
  console.log("listenning on 8080");
  </code></pre>
  
  <p>HTML page: </p>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript" src="/web3-min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/etherjs.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Error: <a href="http://prntscr.com/jmue8t" rel="nofollow noreferrer">http://prntscr.com/jmue8t</a></p>
  
  <p>File architecture on the instance: <a href="http://prntscr.com/jmuebs" rel="nofollow noreferrer">http://prntscr.com/jmuebs</a></p>
  
  <p>Why is it doing that and how to solve that?</p>
  
  <p>Edit: NGINX configuration file (server_name is my instance external IP):</p>
  
  <p><a href="http://prntscr.com/jmy8wy" rel="nofollow noreferrer">http://prntscr.com/jmy8wy</a></p>