title: Error of not being able to look at the website I am creating
body: <p>so I am a beginner coder, who is using firebase to create a code that would allow me to send data that is continuously created to a self-created website. So far, I have managed to create a cloud function that allows me to do so. I am now working on the website that would allow me to send the necessary data to that website. When I try to use the command firebase-serve --only &quot;hosting,functions&quot;, I would get an error when I click the URL link that says CANNOT GET/. Here is the code that I am working with so far</p>
  <pre><code>const functions = require(&quot;firebase-functions&quot;);
  const express = require('express');
  const engines = require('consolidate');
  var hbs = require('handlebars');
  const admin = require('firebase-admin');
  const app = express();
  
  app.engine('hbs',engines.handlebars);
  
  app.set('views', './views');
  
  app.set('view engine', 'hbs');
  
  const { service } = require(&quot;firebase-functions/v1/analytics&quot;);
  const { response } = require(&quot;express&quot;);
  
  var serviceAccount = require(&quot;./unabiz-firebase-firebase-adminsdk-ehtzo-0b37e0cf1f.json&quot;);
  
  admin.initializeApp({
      credential: admin.credential.cert(serviceAccount),
      databaseURL: &quot;firebase-adminsdk-ehtzo@unabiz-firebase.iam.gserviceaccount.com&quot;
    });
  
  
  async function getFirestore() {
      const firestore_con = await admin.firestore();
  
      const writeResult = firestore_con.collection('device').doc(&quot;device&quot;).get().then(doc=&gt; 
          {
              if (doc.exists) {return doc.data();}
              else {console.log(&quot;No such document!&quot;);}})
      .catch(err =&gt; {console.log('Error getting document', err);})
  
  }
  </code></pre>
  <p>Here is also my code for my index file.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset=&quot;UTF-8&quot;&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
          &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;ie=edge&quot;&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css&quot;&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;main&gt;
              &lt;form&gt;
                  &lt;label for=&quot;dataId&quot; id=&quot;dataId&quot;&gt;Data ID&lt;/label&gt;
                  &lt;input type=&quot;text&quot; name=&quot;dataId&quot; id=&quot;&quot;&gt;
                  &lt;label for=&quot;deviceId&quot; id=&quot;deviceId&quot;&gt;Device ID&lt;/label&gt;
                  &lt;input type=&quot;text&quot; name=&quot;userId&quot; id=&quot;userId&quot;&gt;
                  &lt;label for=&quot;DateTime&quot; id=&quot;DateTime&quot;&gt;Date &amp; Time&lt;/label&gt;
                  &lt;input type=&quot;datetime-local&quot; name=&quot;DateTime&quot; id=&quot;DateTime&quot;&gt;
                  &lt;button id=&quot;readBtn&quot; class=&quot;btn waves-effect waves-light&quot; id&gt;Read&lt;/button&gt;
              &lt;/form&gt;
          &lt;/main&gt;
  
          &lt;script type=&quot;module&quot;&gt;
              // Import the functions you need from the SDKs you need
              &lt;script src=&quot;https://www.gstatic.com/firebasejs/9.1.1/firebase-app.js&quot;&gt;&lt;/script&gt;
              // TODO: Add SDKs for Firebase products that you want to use
              // https://firebase.google.com/docs/web/setup#available-libraries
  
              // Your web app's Firebase configuration
              const firebaseConfig = {
                  apiKey: &quot;AIzaSyDVYsLyFvqo8jYc28QPiD5Os69PxKvnG1g&quot;,
                  authDomain: &quot;unabiz-firebase.firebaseapp.com&quot;,
                  databaseURL: &quot;https://unabiz-firebase-default-rtdb.firebaseio.com&quot;,
                  projectId: &quot;unabiz-firebase&quot;,
                  storageBucket: &quot;unabiz-firebase.appspot.com&quot;,
                  messagingSenderId: &quot;48829412875&quot;,
                  appId: &quot;1:48829412875:web:6273116637b54d0bc2b90e&quot;
              };
  
              // Initialize Firebase
              const app = initializeApp(firebaseConfig);
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Do note that I have initialize firebase onto the project, and am using firestore, functions and hosting. I am unsure if I have miss out anything but if anyone is able to help me out quickly that would be very nice.</p>