DEV Community

Discussion on: Beginner's Guide for Creating a Serverless REST API using NodeJS over Google Cloud Functions

Collapse
 
vardank37 profile image
vardank37

Hey Levi, Thank you for this tutorial. I just have one question, is it possible to get data in realtime using restful API?

Collapse
 
levivm profile image
Levi Velázquez

Yes, I mean, in this example you are getting the data in real-time or do you have other concept in mind ?

Collapse
 
vardank37 profile image
vardank37 • Edited

Here we are sending get and post requests but what I am asking for is something like firebase listeners. Like how can we get data automatically ( get data in frontend ) if something changes in the database without sending a request?

Thread Thread
 
levivm profile image
Levi Velázquez

Ah, I got it, no, this for request/response flow, but Firebase has a tool for that: Firebase Cloud Messaging, so, you can have channels/listeners and send data back and forth: firebase.google.com/docs/cloud-mes...