Hosting a REST API with a Cloud Firestore backend
You can find the code here →
In the past, you’ve probably hosted different REST APIs on different backend servers such as Cloud SQL, Firebase, or App Engine. In this episode of Serverless Expeditions Extended, Martin Omander and Roger Martinez show you how to host a REST API on a Firestore backend. Watch as Roger and Martin guide you through initializing firestore, setting up the endpoints for your API, and much more!
Timestamps:
00:00 – Intro
00:59 – Firestore in Google Cloud Console
02:10 – Code: package.json
02:57 – Code: index.js
04:30 – Code: the app.get() function
06:10 – Deployment with Cloud Build and Cloud Run
07:04 – Cloud Build and Container Registry in Google Cloud Console
07:52 – Cloud Run in Google Cloud Console
08:34 – Demo 1
09:21 – Code: app.post() function
13:53 – Demo 2
15:37 – Troubleshooting!
17:37 – Demo 3
Checkout more episodes of Serverless Expeditions →
Subscribe to get all the episodes as they come out →
product: Cloud Firestore; fullname: Roger Martinez, Martin Omander;
#ServerlessExpeditions #ServerlessExpeditionsExtended
I am a random person watching it. Luck to be first person to dislike since i don't understand
I couldn't help noticing the ~2.9 second POST request. Is this because of a cold start of the container or something?
Great Video, exactly what I was looking for. However, how would you ensure the firestore cloud rules are being enforced if you are relying on the auth.id or a custom claim token? I don't see a way to access the firestore auth object in the google/firestore nodejs lib.
Please can you do a video on cloud Functions. Runtime environments used in Cloud Functions and also the function framework. Thankyou this videos are awesome kudos to helping as learn.
Are there any good examples of planning a backend in Firestore for a social network of sorts (Database Planning)
We can use firebase hosting for this sad, firebase hosting origin only available in USA zone 🙁 they don't even care to mention it in fb documents
Very informative. Please make a video on serverless service Work flows.
great example. can you please include a link to the associated/example github repo
Great video. Thanks
1) Is there a way to test locally and access to firestore? I guess firestore won’t run locally, but the troubleshooting feedback will be faster, and
2) could you add Auth to the rest call? Like only for the POST request.
I really don't understand why the old video describing this exact coding was removed. Are you also going to bring back the cloudrun video about converting Google sheets to API too ?
Fantastic video! It’d be perfect if there’s a server less X cloud SQL X cloud function tutorial !
Google
Is there a difference in using firestorm in console or from its own website? And were all the tools in the free tier?
Building an actual website will be better, example: Small Portfolio or ToDo list app
👏👏👏👏👏👏
Very informative. Would be interested to see how JWT works in serveless setup
Where is the dockerfile?
Thx for this video. After this example we have multiple containers, do we need to pay for these old containers? Do we need to pay for unused service revisions?
Great video and good example of troubleshooting with Logging
Thank you very much. I understand this one.
Thank you! Would you consider a similar video with API Gateway for external access?