I want to use firebase functions to host my expressjs webapp, however all get parameters seem undefined. Whats the problem?
import functions= require("firebase-functions");
import admin= require("firebase-admin");
import express= require("express");
import bodyParser= require("body-parser");
const app: express.Application = express();
admin.initializeApp();
app.get("/getstory", async (req,resp)=>{
try{
const preferred_storyid=req.params.preferred_storyid;
console.log(`preferred_storyid ${preferred_storyid}`) //logs preferred_storyid undefined. Why?
resp.send("ok");
}catch (e) {
resp.send(`erequest_story. ${e}`);
}
});
const faststoryapi = functions.https.onRequest(app);
module.exports={faststoryapi}
Then the code is deployed with
firebase deploy --only functions
and get request sent by post man

PS: I have noticed that i cant have more than one route eg i cant have more than one post end point or else the second one is not called. How do you guys do it?