Reputation: 325
I have a Google Cloud Function populating Google Datastore and I would like to build a website on Firebase Hosting and ReactJS that visualizes this data. There is a lot of documentation on using Firebase Realtime Database but I don't see any way to access Google Datastore from Firebase Hosting.
Upvotes: 1
Views: 660
Reputation: 599631
Cloud Datastore is a NoSQL database that you integrate with your existing backend services. There is no client-side SDK for accessing Cloud Datastore directly from your website.
The simplest way to expose Cloud Datastore to your website clients is to write a API with Cloud Functions for Firebase using a third-party Node.js SDK. You'll write a HTTP-triggered function for each call that you want to allow from the client. This results in a server-side API, with Google Cloud Functions managing all the infrastructure/servers for you.
If you're looking for a NoSQL database that you can integrate directly into your website, have a look at Cloud Firestore. This uses a similar data model to Datastore, but comes with Firebase SDKs that allow direct access from the client, a server-side security model, and integrates with Firebase Authentication to allows you to secure access based on user credentials.
Upvotes: 4