June 2018
Beginner to intermediate
394 pages
9h 2m
English
Once we write the functions, we could host them in a few simple commands. In simple terms, we will host a Hello World program. Your index.js file by default will have a hello world program. Uncomment the code and pass the string you want as the function's output:
const functions = require('firebase-functions');// // Create and Deploy Your First Cloud Functions// // https://firebase.google.com/docs/functions/write-firebase-functionsexports.helloWorld = functions.https.onRequest((request, response) => { response.send("Packt mastering firebase!");});
Now, we can deploy the the complete project with the following command:
$ firebase deploy --only functions
If you wanted to deploy one particular method, you can ...
Read now
Unlock full access