I\'m exploring the firebase cloud functions and I\'m trying to send a notifications with an http request.
The problem is that even if I manage to send the notificati
HTTP-triggered Cloud Functions work just like Express apps -- you have a response object (res
) that you need to use to send something when the request is done. In this case, it looks like you could do something like:
return Promise.all([
/* ... */
]).then(() => {
res.status(200).send('ok');
}).catch(err => {
console.log(err.stack);
res.status(500).send('error');
});