Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase callable + express?

With functions.https.onRequest(app); it was possible to use express right away.

I'm wondering if it's possible to use functions.https.onCall(...) together with express in the same way?

onCall(...) seem to have a different signature but maybe there is still a way to keep using express while working with onCall(...) functions?

like image 835
vir us Avatar asked Jan 27 '23 15:01

vir us


1 Answers

No, it's not possible. Callable functions force your endpoint to use a certain path, a certain type of input (JSON via POST) and a certain type of output (also JSON). Express wouldn't really help you out, given the constraints of how callables work. You can read about all the callable protocol details in the documentation. You can see that callables abstract away all of the details of the request and response, which you would normally work with when using Express.

like image 179
Doug Stevenson Avatar answered Feb 09 '23 01:02

Doug Stevenson