I'm setting up an express app in firebase functions
The application is running correctly in the next url
But I want to make it run in this url, just like in the official Firebase tutotial on youtube
What am I doing wrong? this is index.js
const functions = require('firebase-functions');
const express = require('express')
const app = express()
app.get('/test', (req, res) => {
res.send('Well if i'm reading this the app is working')
})
exports.app = functions.https.onRequest(app)
And this: firebase.json
{
"hosting": {
"public": "public",
"rewrite":[{
"source": "/test",
"function": "app"
}],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
If I enter directly to "localhost: 5000 / test" I am redirected to 404.html in the public folder, thanks for reading.