Firebase Cloud Functions



Introduction to Firebase Cloud Functions

If you have never heard of cloud functionality, the concept is very simple. Deploy simple logic to the server in the form of a function, and invoke a hardworking sprite magically to perform tasks. All this pays only for running resources, without worrying about the infrastructure.

In many cases, this new paradigm makes it easy to create, maintain, and execute back-end code.

The Firebase Cloud feature is particularly similar to the LEGO module that can connect to any Firebase service. For example, you can trigger functions when uploading images to Firebase Storage to create thumbnails or erasing user data when deleting a node in a live database. Everything that happens with Firebase can trigger a feature.


If this is not enough, you can also use HTTP to trigger via GET, POST, etc. Watch a great video on how to create a complete Express app using Firebase Hosting with Cloud capabilities.

What can do Firebase Cloud Functions 

  • Notify users when something interesting happens.
  • Perform Realtime Database sanitization and maintenance.
  • Execute intensive tasks in the cloud instead of in your app.
  • Integrate with third-party services and APIs.
Simple Cloud Function Example Code

exports.helloWorld = functions.https.onRequest((req, res) => {
  res.status(200).send('Hello, World!');
});

Output:
Hello, World!

Firebase Cloud Functions Dashboard

This window displays all of the deployed functions

Firebase Cloud Functions Logs

This window displays all of the cloud functions log outputs and functions trigering statuses. 

Comments

Popular posts from this blog

NoSQL (Not Only SQL database)

React JS