Hi I want to fetch data from firebase database using firebase cloud function http trigger. Is it possible using functions.database.ref?
var functions = require('firebase-functions');
var cors = require("cors");
var express = require('express');
var http = require('http');
const app = express()
//~ app.use(cors({ origin: true }))
app.get("/", (request, response) => {
response.send("Hello from Express on Firebase with CORS!")
})
app.get("/:id", (request, response) => {
functions.database.ref('/Users/'+request.params.id)
})
exports.httpFunction = functions.https.onRequest(app);
thanks