{"id":15605,"date":"2022-09-22T12:48:24","date_gmt":"2022-09-22T12:48:24","guid":{"rendered":"https:\/\/dynamics.folio3.com\/blog\/?p=15605"},"modified":"2023-11-15T08:32:02","modified_gmt":"2023-11-15T08:32:02","slug":"fly-in-cloud-functions","status":"publish","type":"post","link":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/","title":{"rendered":"Fly in Cloud Functions"},"content":{"rendered":"<h2><span style=\"font-weight: 400;\">Why roam around when you were meant to stay high? <\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Ever faced a situation where your application needs to run a piece of code in response to any<\/span> <span style=\"font-weight: 400;\">HTTPS request or a change in your Firestore? More so ever, your application runs on different<\/span> <span style=\"font-weight: 400;\">devices and needs a central brain power?! Cloud Functions for Firebase are here to rescue and<\/span><span style=\"font-weight: 400;\"> the best part is that you don\u2019t need to manage and scale your own servers for it!\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">So What are Firebase Cloud Functions?\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Cloud functions are powerful methods that give your apps a <\/span><b>secure <\/b><span style=\"font-weight: 400;\">and <\/span><b>strong <\/b><span style=\"font-weight: 400;\">single point of<\/span> <span style=\"font-weight: 400;\">change without the hassle of publishing or deploying your entire application again. You have the<\/span><span style=\"font-weight: 400;\"> choice to write your cloud functions in <\/span><b>JavaScript <\/b><span style=\"font-weight: 400;\">or <\/span><b>TypeScript<\/b><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can imagine them to be like efficient computing machines that will run your logic whenever<\/span> <span style=\"font-weight: 400;\">they are <\/span><b>triggered<\/b><span style=\"font-weight: 400;\">.<\/span> <span style=\"font-weight: 400;\">A trigger is like the play button to start your function in action. It can be<\/span> <span style=\"font-weight: 400;\">anything interesting in the Firebase database, like adding or modifying a document, or it could<\/span> <span style=\"font-weight: 400;\">be an HTTPs request (GET\/POST). For example, execute a function to generate a thumbnail<\/span> <span style=\"font-weight: 400;\">whenever an image is uploaded in your collection.<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, <\/span><span style=\"font-weight: 400;\">Cloud Firestore, gives you generic HTTP <\/span><span style=\"font-weight: 400;\">onRequest()<\/span><span style=\"font-weight: 400;\"> event, which supports routers and<\/span> <span style=\"font-weight: 400;\">apps managed by the <\/span><span style=\"font-weight: 400;\">Express<\/span> <span style=\"font-weight: 400;\">web framework and four triggers to handle the firestore events:<\/span><\/p>\n<ul>\n<li><b>OnCreate <\/b><span style=\"font-weight: 400;\">(new document added)\u00a0<\/span><\/li>\n<li><b>OnUpdate <\/b><span style=\"font-weight: 400;\">(existing document modified)\u00a0<\/span><\/li>\n<li><b>OnDelete <\/b><span style=\"font-weight: 400;\">(existing document removed)\u00a0<\/span><\/li>\n<li><b>OnWrite <\/b><span style=\"font-weight: 400;\">(any of the create, update or delete action performed)\u00a0<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400;\">What does Firebase Cloud Function do?\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Firebase Cloud Function simply runs your back-end logic with automatic scaling and without the<\/span> <span style=\"font-weight: 400;\">hassle of server management. Your code is secure and you have zero maintenance issues.<\/span> <span style=\"font-weight: 400;\">Once you deploy your function, it is invoked when the event matches the trigger of the function<\/span> <span style=\"font-weight: 400;\">and Google takes care of load being increased or decreased and cleaning up the instances. It<\/span><span style=\"font-weight: 400;\"> only<\/span> <span style=\"font-weight: 400;\">charges<\/span> <span style=\"font-weight: 400;\">for the specific event usage.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Useful scenarios for your application can be diverse, but typical cases where flying in the clouds<\/span> <span style=\"font-weight: 400;\">would be helpful as shared in<\/span> <span style=\"font-weight: 400;\">official docs<\/span> <span style=\"font-weight: 400;\">are:<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Notify users when something interesting happens<\/span><span style=\"font-weight: 400;\">.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Perform database sanitization and maintenance<\/span><span style=\"font-weight: 400;\">.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Execute intensive tasks in the cloud instead of in your app<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Integrate with third-party services and APIs<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400;\">Implementing A Firebase Cloud Function\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To implement your own cloud function, you\u2019ll just need four simple ingredients to get started. We<\/span> <span style=\"font-weight: 400;\">will look into an Angular project to demonstrate the process of writing, testing and deploying<\/span><span style=\"font-weight: 400;\"> your cloud function.\u00a0<\/span><\/p>\n<p><b>Getting the Ingredients:<\/b><b>\u00a0<\/b><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Node.js<\/span> <span style=\"font-weight: 400;\">(Install Node in your machine)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">firebase-cli <\/span><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\"><code>npm install -g firebase-tools<\/code> <\/span><span style=\"font-weight: 400;\">(Install this package)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">VS Code<\/span> <span style=\"font-weight: 400;\">(or your editor of choice!)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Firebase project (If you don\u2019t have an existing project, <\/span><span style=\"font-weight: 400;\">firebase console<\/span> <span style=\"font-weight: 400;\">offers a friendly and easy way to setup your project)<\/span><\/li>\n<\/ul>\n<p><b>Recipe for Cloud Functions:\u00a0<\/b><\/p>\n<ol style=\"list-style: upper-roman;\" start=\"1\">\n<li>\n<h3>Create Angular Project &amp; Bind it with Cloud Firestore:<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Simply create a new Angular project by running following command in your choice of directory: , or bind your existing project with Firebase by running the following commands in the given order:\u00a0<\/span><\/p>\n<ol>\n<li><i> <\/i><span style=\"font-weight: 400;\"><code>firebase login<\/code><\/span> <span style=\"font-weight: 400;\">(login with your firebase credentials)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><code>firebase init firestore<\/code><\/span> <span style=\"font-weight: 400;\">(to initialize firestore)\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><code>firebase init functions<\/code><\/span><span style=\"font-weight: 400;\">(to initialize cloud functions)\u00a0<\/span><\/li>\n<li><i> <\/i><span style=\"font-weight: 400;\"><code>npm install<\/code><\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">If the commands were successful, your project structure should look like this: <\/span><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-15607\" src=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/002-unnamed.png\" alt=\"\" width=\"443\" height=\"220\" srcset=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/002-unnamed.png 443w, https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/002-unnamed-300x149.png 300w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Reference: <\/span><span style=\"font-weight: 400;\">Firebase Google Docs<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If your project is already using firebase power, make sure to validate functions are initialized by checking the firebase.json file in your project. <\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-15608\" src=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/003-unnamed.png\" alt=\"\" width=\"303\" height=\"199\" srcset=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/003-unnamed.png 303w, https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/003-unnamed-300x197.png 300w\" sizes=\"(max-width: 303px) 100vw, 303px\" \/><\/p>\n<ol style=\"list-style: upper-roman;\" start=\"2\">\n<li>\n<h3>Import Modules &amp; App Initialization:<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">If you plan to use the firebase triggers, add these lines to load the modules and app initialization:\u00a0<\/span><\/p>\n<pre class=\"wp-block-code\"><code>\/\/ The Cloud Functions for Firebase SDK to create Cloud Functions and set up triggers.\r\nconst functions = require('firebase-functions');\r\n\/\/ The Firebase Admin SDK to access Firestore.\r\nconst admin = require('firebase-admin');\r\nadmin.initializeApp();<\/code><\/pre>\n<ol style=\"list-style: upper-roman;\" start=\"3\">\n<li>\n<h3>Shoot your First Function<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Code the cloud function that solves your problem. But analyze the suitable <\/span><b>trigger <\/b><span style=\"font-weight: 400;\">for your requirement.<\/span><\/p>\n<ol style=\"list-style: upper-roman;\" start=\"4\">\n<li>\n<h3>Example: Hello Cloud Functions<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">We\u2019ll try out the simple HTTPS GET trigger for our legacy hello world function. In your <\/span><span style=\"font-weight: 400;\"><code>src<\/code><\/span> <span style=\"font-weight: 400;\">folder, make a folder for hello-world and make an <\/span><span style=\"font-weight: 400;\"><code>index.ts<\/code><\/span> <span style=\"font-weight: 400;\">file in it with the following code: <\/span><\/p>\n<pre style=\"padding-left: 40px;\"><code>const functions = require('firebase-functions');\r\nexport const helloWorldFunc =\r\nfunctions.https.onRequest((req, res) =&gt; {\r\nres.send(\"Hello Cloud Functions\")\r\n});<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">The function is simply making the necessary import and listening to HTTPS requests and always sending the greeting string in return. If you want to respond based on a specific URL path, you can add necessary conditions for your code.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This hierarchy is not necessary will help you in managing multiple functions for your same project:<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-15609\" src=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/004-unnamed.png\" alt=\"\" width=\"324\" height=\"293\" srcset=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/004-unnamed.png 324w, https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/004-unnamed-300x271.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">In your main <\/span><span style=\"font-weight: 400;\">index.ts<\/span> <span style=\"font-weight: 400;\">file, export the function by the following:\u00a0<\/span><\/p>\n<p><code>export const helloWorld = helloWorldFunc;<\/code><\/p>\n<ol style=\"list-style: upper-roman;\" start=\"5\">\n<li>\n<h3>Debug Cloud Functions Locally<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Build the function using <\/span><span style=\"font-weight: 400;\">tsc<\/span> <span style=\"font-weight: 400;\">and attach the debugger using the command: <\/span><\/p>\n<p><code>firebase emulators:start --inspect-functions <\/code><\/p>\n<p><span style=\"font-weight: 400;\">Attach breakpoints and debug your code.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Note: if your function is triggered on one of the firestore events, make sure you are manipulating your collections on<\/span> <span style=\"font-weight: 400;\">http:\/\/localhost:4000\/firestore\/ <\/span><span style=\"font-weight: 400;\">to debug your code.\u00a0<\/span><\/p>\n<ol style=\"list-style: upper-roman;\" start=\"6\">\n<li>\n<h3>Deploy &amp; Test Cloud Functions<\/h3>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">When you are happy with your cloud function and want to test it in action, simply deploy it. You can deploy the function in one of the three options:\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\"> deploy <\/span><b>all <\/b><span style=\"font-weight: 400;\">using the following command:\u00a0<\/span><\/li>\n<\/ul>\n<p><code>firebase deploy --only functions<\/code><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\"> deploy a <\/span><b>specific <\/b><span style=\"font-weight: 400;\">function:\u00a0<\/span><\/li>\n<\/ul>\n<p><code>firebase deploy --only functions:hello_world <\/code><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">deploy <\/span><b>multiple <\/b><span style=\"font-weight: 400;\">functions using comma separated keyword:<\/span><\/li>\n<\/ul>\n<p><code>firebase deploy --only<br \/>\nfunctions:function_1,functions:function_2,functions:functio n_3<\/code><\/p>\n<p><span style=\"font-weight: 400;\">If you are re-deploying an existing function, it\u2019s a good practice to first remove it from the functions list and then deploy, to make sure the latest instance is running. Your deployed function should appear in the dashboard list: <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15610\" src=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/005-unnamed.png\" alt=\"\" width=\"467\" height=\"161\" srcset=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/005-unnamed.png 467w, https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/005-unnamed-300x103.png 300w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">For tracking purposes and debugging, you can check logs at\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">https:\/\/console.cloud.google.com\/functions<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15611\" src=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/006-unnamed.png\" alt=\"\" width=\"468\" height=\"236\" srcset=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/006-unnamed.png 468w, https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/006-unnamed-300x151.png 300w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/p>\n<h2><span style=\"font-weight: 400;\">Who uses Firebase Cloud Function?\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Firebase is much popular in the tech world and according to stackshare, it is <\/span><span style=\"font-weight: 400;\">used by 2854<\/span> <span style=\"font-weight: 400;\">companies<\/span> <span style=\"font-weight: 400;\">including Alibaba, The New York Times and many more. <\/span><span style=\"font-weight: 400;\">Companies that use cloud<\/span> <span style=\"font-weight: 400;\">functions<\/span> <span style=\"font-weight: 400;\">include Jounce, Bunch, TechStack and many more.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">So, Will You Try it Out?\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Hope you enjoyed paragliding in the cloud functions! This <\/span><span style=\"font-weight: 400;\">practical guide<\/span> <span style=\"font-weight: 400;\">by Codelabs will be helpful to execute your first project and the<\/span> <span style=\"font-weight: 400;\">official docs<\/span> <span style=\"font-weight: 400;\">are always the best reference point to solve your queries!\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Moreover, if you are interested in checking out some cool and efficient code for popular use cases of Cloud Functions for Firebase, check it on this <\/span><span style=\"font-weight: 400;\">Firebase GitHub repository<\/span><span style=\"font-weight: 400;\">. If you have any queries or want to discuss a problem case, feel free to reach out at <\/span><a href=\"mailto:nashwatariq@folio3.com\"><span style=\"font-weight: 400;\">nashwatariq@folio3.com<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why roam around when you were meant to stay high? Ever faced a situation where your application needs to run a piece of code in response to any HTTPS request or a change in your Firestore? More so ever, your application runs on different devices and needs a central brain power?! Cloud Functions for Firebase [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15606,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[127],"class_list":["post-15605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other","tag-managed-cloud-service"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fly in Cloud Functions<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fly in Cloud Functions\" \/>\n<meta property=\"og:description\" content=\"Why roam around when you were meant to stay high? Ever faced a situation where your application needs to run a piece of code in response to any HTTPS request or a change in your Firestore? More so ever, your application runs on different devices and needs a central brain power?! Cloud Functions for Firebase [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Folio3 Dynamics Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-22T12:48:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-15T08:32:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png\" \/>\n\t<meta property=\"og:image:width\" content=\"468\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Folio3 Microsoft Dynamics Partner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@folio_3\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nashwa Tariq\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\"},\"author\":{\"name\":\"Folio3 Microsoft Dynamics Partner\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/f7d38b88c941636642e7a9ecf91c20b4\"},\"headline\":\"Fly in Cloud Functions\",\"datePublished\":\"2022-09-22T12:48:24+00:00\",\"dateModified\":\"2023-11-15T08:32:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\"},\"wordCount\":997,\"publisher\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png\",\"keywords\":[\"managed cloud service\"],\"articleSection\":[\"Other\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\",\"url\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\",\"name\":\"Fly in Cloud Functions\",\"isPartOf\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png\",\"datePublished\":\"2022-09-22T12:48:24+00:00\",\"dateModified\":\"2023-11-15T08:32:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage\",\"url\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png\",\"contentUrl\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png\",\"width\":468,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/dynamics.folio3.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fly in Cloud Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#website\",\"url\":\"https:\/\/dynamics.folio3.com\/blog\/\",\"name\":\"Folio3 Dynamics Blog\",\"description\":\"News, Guides and Info from the world of Microsoft Dynamics\",\"publisher\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dynamics.folio3.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#organization\",\"name\":\"Folio3\",\"url\":\"https:\/\/dynamics.folio3.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/01\/footer-logo.png\",\"contentUrl\":\"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/01\/footer-logo.png\",\"width\":154,\"height\":100,\"caption\":\"Folio3\"},\"image\":{\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/f7d38b88c941636642e7a9ecf91c20b4\",\"name\":\"Folio3 Microsoft Dynamics Partner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/29f05a21b8db20048e7717694b024bbd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/29f05a21b8db20048e7717694b024bbd?s=96&d=mm&r=g\",\"caption\":\"Folio3 Microsoft Dynamics Partner\"},\"description\":\"Top Microsoft Dynamics partner with 300+ Projects completed worldwide since 2001. Delivering a single point solution tailored to your business needs.\",\"sameAs\":[\"https:\/\/x.com\/folio_3\"],\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fly in Cloud Functions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/","og_locale":"en_US","og_type":"article","og_title":"Fly in Cloud Functions","og_description":"Why roam around when you were meant to stay high? Ever faced a situation where your application needs to run a piece of code in response to any HTTPS request or a change in your Firestore? More so ever, your application runs on different devices and needs a central brain power?! Cloud Functions for Firebase [&hellip;]","og_url":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/","og_site_name":"Folio3 Dynamics Blog","article_published_time":"2022-09-22T12:48:24+00:00","article_modified_time":"2023-11-15T08:32:02+00:00","og_image":[{"width":468,"height":180,"url":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png","type":"image\/png"}],"author":"Folio3 Microsoft Dynamics Partner","twitter_card":"summary_large_image","twitter_creator":"@folio_3","twitter_misc":{"Written by":"Nashwa Tariq","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#article","isPartOf":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/"},"author":{"name":"Folio3 Microsoft Dynamics Partner","@id":"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/f7d38b88c941636642e7a9ecf91c20b4"},"headline":"Fly in Cloud Functions","datePublished":"2022-09-22T12:48:24+00:00","dateModified":"2023-11-15T08:32:02+00:00","mainEntityOfPage":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/"},"wordCount":997,"publisher":{"@id":"https:\/\/dynamics.folio3.com\/blog\/#organization"},"image":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png","keywords":["managed cloud service"],"articleSection":["Other"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/","url":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/","name":"Fly in Cloud Functions","isPartOf":{"@id":"https:\/\/dynamics.folio3.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage"},"image":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png","datePublished":"2022-09-22T12:48:24+00:00","dateModified":"2023-11-15T08:32:02+00:00","breadcrumb":{"@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#primaryimage","url":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png","contentUrl":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/09\/001-unnamed.png","width":468,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/dynamics.folio3.com\/blog\/fly-in-cloud-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/dynamics.folio3.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Fly in Cloud Functions"}]},{"@type":"WebSite","@id":"https:\/\/dynamics.folio3.com\/blog\/#website","url":"https:\/\/dynamics.folio3.com\/blog\/","name":"Folio3 Dynamics Blog","description":"News, Guides and Info from the world of Microsoft Dynamics","publisher":{"@id":"https:\/\/dynamics.folio3.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dynamics.folio3.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dynamics.folio3.com\/blog\/#organization","name":"Folio3","url":"https:\/\/dynamics.folio3.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/01\/footer-logo.png","contentUrl":"https:\/\/dynamics.folio3.com\/blog\/wp-content\/uploads\/2022\/01\/footer-logo.png","width":154,"height":100,"caption":"Folio3"},"image":{"@id":"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/f7d38b88c941636642e7a9ecf91c20b4","name":"Folio3 Microsoft Dynamics Partner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dynamics.folio3.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/29f05a21b8db20048e7717694b024bbd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29f05a21b8db20048e7717694b024bbd?s=96&d=mm&r=g","caption":"Folio3 Microsoft Dynamics Partner"},"description":"Top Microsoft Dynamics partner with 300+ Projects completed worldwide since 2001. Delivering a single point solution tailored to your business needs.","sameAs":["https:\/\/x.com\/folio_3"],"url":""}]}},"_links":{"self":[{"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/posts\/15605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/comments?post=15605"}],"version-history":[{"count":0,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/posts\/15605\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/media\/15606"}],"wp:attachment":[{"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/media?parent=15605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/categories?post=15605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dynamics.folio3.com\/blog\/wp-json\/wp\/v2\/tags?post=15605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}