title: Firebase Functions GET http://localhost:5001/runtime.js net::ERR_ABORTED 404 (Not Found)
body: <p>I'm new to firebase, and trying to host my Angular 6 + node.js + express app at firebase, using firebase functions.</p>
  
  <p>I have checked all paths to exist.
  This is the code in my functions/index.js file:</p>
  
  <pre><code>const functions = require('firebase-functions');
  const express = require('express');
  const path = require('path');
  
  
  const app = express();
  
  // Point static path to dist
  app.use(express.static(path.join(__dirname, 'dist/myProject')));
  
  
  // Catch all other routes and return the index file
  app.get('*', (req, res) =&gt; {
      res.sendFile(path.join(__dirname, './../dist/myProject/index.html'));
  });
  exports.app = functions.https.onRequest(app)
  </code></pre>
  
  <p>The way I understand, my site should be visible at the address firebase has supplied me with: </p>
  
  <blockquote>
    <p><a href="http://localhost:5001/myproject-1529850544497/us-central1/app" rel="nofollow noreferrer">http://localhost:5001/myproject-1529850544497/us-central1/app</a></p>
  </blockquote>
  
  <p>When typing in this address in my browser, this is the error i'm getting (x12 times):</p>
  
  <pre><code>GET http://localhost:5001/styles.js net::ERR_ABORTED 404 (Not Found)
  </code></pre>
  
  <p>How can I make it so the index.html is returned properly?</p>