I can see a new entry is added as soon as I get the URL, but the request hangs and times out. Why?
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.add = functions.https.onRequest((request, response)=>
{
var ref = admin.database().ref("jobs");
var childRef = ref.push();
childRef.set
(
{
title: "test",
pay: 100
}
);
})
The code is based on the following example. https://firebase.google.com/docs/database/admin/save-data
Result
{"error":{"code":500,"status":"INTERNAL","message":"function execution attempt timed out"}}