less than 1 minute read

Cloud functions: finally !

Back in a 2015 post I’ve explained one way of complementing Firebase with NodeJs on Heroku when server side code was needed. In the mean time, the world has evolved and so Google Cloud Platform. Last week Google announced that Google Cloud Functions was just released as public beta: that adds another way of complementing firebase. Now the same architecture proposed in 2015 would look like this:

Fiebase + nodejs

Basic example

I’ve done a very basic example to see how difficult was to get from 0 to react to firebase events: aligned to other Google products, it takes around 5 minutes to get started. :)

  • firebase init will create a functions folder
  • add your function in functions\index.js. See an example in this Github repo in functions\index.js
  • deploy with firebase deploy from the folder functions
  • celebrate. You can play with it from firebase dashboard. From there you can also see functions logs and usage.

Flows

  • App Engine is in beta
  • Cloud Functions are in beta

More links

Comments