0

I have prepared a site using express.js and e.js. When I deploy this site to firebase functions, when I open the url specified in firebase, I get the error "Site not found" and the e.js file is not indexed.

functions/index.js file:

const functions = require("firebase-functions");
const express = require("express");
const cors = require("cors");
const app = express();
app.set('view engine', 'ejs');
app.use(express.static('public'));


app.use(cors());

app.get('/', (req, res) => {
    res.render('index.ejs');
});

exports.app = functions.https.onRequest(app);

I tried using firebase hosting and it didn't work

  • Please add a summary of how your directories are laid out in your project folder ([like shown here](https://stackoverflow.com/a/58877253/3068190)) to your question along with your `firebase.json` file. – samthecodingman Aug 16 '23 at 01:31

0 Answers0