A cloud function to implement a counter

Akshay Ashok
Club DevBytes
Published in
1 min readApr 24, 2019

Part of “Building formiQR” series

To add the counter we need to append the following code in the index.js, which we created in Part-2 post, please refer it before proceeding.

Code to implement the counter

We would be creating the atEvent node in the next blog, where it would be generated when we scan the QR with the android app.

To understand the path and the code in above gist, have a look at Realtime database.

Understanding how to get this done took an effort, so if you don’t get it they feel free to ask me in comments. This code is just of few lines, but it did it job perfectly to give me a bad time 😰

No lets us move to the final part of this series.

--

--

Akshay Ashok
Club DevBytes

Microsoft Student Partner || React || Learning Deep Learning ||Building projects for fun || If you have a question, my DMs are open on Twitter: aks2899