Created
March 13, 2019 03:20
-
-
Save hossain-khan/efac2c76f2dbbe0d50a646ede49dbd7b to your computer and use it in GitHub Desktop.
Firebase and express barebone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// [START import] | |
const functions = require('firebase-functions'); | |
const express = require('express'); | |
const app = express(); | |
// [END import] | |
// [START middleware] | |
const cors = require('cors')({origin: true}); | |
app.use(cors); | |
// [END middleware] | |
// Define the Firebase function that will act as Express application | |
// Note: This `api` must match with `/firebase.json` rewrites rule. | |
exports.api = functions.https.onRequest(app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment