Function

Example Function

const functions = require("firebase-functions");

const express = require('express');
const cors=require('cors');
const bodyParser = require('body-parser');
const app = express();

app.use(cors({origin:true}));
app.use(bodyParser.json());
app.get('/hello',(req,res,next)=> {
    res.status(200).send("Hello From server");
})
exports.helloWord = functions.https.onRequest(app);

Last updated

Was this helpful?