This file contains 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
import * as firebaseAdmin from "firebase-admin"; | |
import * as functions from "firebase-functions"; | |
import express from "express"; | |
import nanoid from "nanoid"; // we use this npm package to generate unique ids for our documents. | |
import * as serviceAccount from "./serviceAccount.json"; | |
const app = express(); | |
const firebase = firebaseAdmin.initializeApp({ | |
credential: firebaseAdmin.credential.cert({ |
This file contains 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
import * as firebaseAdmin from "firebase-admin"; | |
import * as functions from "firebase-functions"; | |
import * as express from "express"; | |
import * as serviceAccount from "./serviceAccount.json"; | |
const app = express(); | |
const firebase = firebaseAdmin.initializeApp({ |
This file contains 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
import * as firebaseAdmin from "firebase-admin"; | |
import * as functions from "firebase-functions"; | |
import express from "express"; | |
import * as serviceAccount from "./serviceAccount.json"; | |
const app = express(); | |
const firebase = firebaseAdmin.initializeApp({ | |
credential: firebaseAdmin.credential.cert({ |
This file contains 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
{ | |
"name": "functions", | |
"scripts": { | |
"lint": "tslint --project tsconfig.json", | |
"build": "tsc", | |
"serve": "npm run build && firebase serve --only functions", | |
"shell": "npm run build && firebase functions:shell", | |
"start": "npm run shell", | |
"deploy": "firebase deploy --only functions", |
This file contains 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
import * as functions from "firebase-functions"; | |
import * as express from "express"; | |
const app = express(); | |
app.get("/", (req: express.Request, res: express.Response) => { | |
res.send("Now we are live with the express server"); | |
}); |
This file contains 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
import * as functions from 'firebase-functions'; | |
export const helloWorld = functions.https.onRequest((request, response) => { | |
response.send("Hello from Firebase!"); | |
}); | |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am lexyblazy on github. | |
* I am lexyblazy (https://keybase.io/lexyblazy) on keybase. | |
* I have a public key ASAMXZbrNaN9OqsxDy1vU_3OLlVXmK4AqmB2dqtB2haWDQo | |
To claim this, I am signing this object: |