I am currently implementing Rest API standards in firebase functions. I am searching for an option for passing id as params. But I am not sure where my current Implementation was sufficient to change like that.
My code looks like this.
export const user = functions.https.onRequest(userModule);
and the URL will be like
https://firebaseapp<baseurl>/user
I need to pass the user id in the URL(not as query param)
expected URL
https://firebaseapp<baseurl>/user/{userId}
Is there any way to make the URL look like the above in firebase functions?
userModuleis? If that's an instance of Express app then you can follow my answer.