gpt4 book ai didi

google-cloud-datastore - 如何将 Google 数据存储用于未托管在 Google 应用引擎中的网络应用?

转载 作者:行者123 更新时间:2023-12-04 18:59:11 26 4
gpt4 key购买 nike

我想在我的网络应用程序中使用谷歌的数据存储,但不想在谷歌应用程序引擎中托管它,我想在其他机器上托管它。那么我如何在这样的网络应用程序中使用数据存储?
会更经济吗?

最佳答案

您需要关注 Accessing the Cloud Datastore API from another platform程序:

This section shows how to activate and access the Cloud Datastore API from an external application running on a platform outside of Google Cloud.

  1. Enable the Cloud Datastore API for the project. You can enable the API for an existing project, or create a new project and then enable the API. Enable the Cloud Datastore API

  2. To use the Cloud Datastore API, your Cloud project requires an active App Engine application. Open the App Engine dashboard and confirm your Cloud project has an active App Engine app. Open the App Engine dashboard

    Create an App Engine app if needed. The app must not be disabled.

  3. Go to the Create service account key page.

  4. Click the drop-down box below Service account, then click New service account.

  5. Enter a name for the service account in Name.

  6. Use the default Service account ID or generate a different one.

  7. Select JSON in Key type.

  8. Click Create.

  9. Upon successful creation, your browser will download the private key. The Cloud Platform Console provides a prompt that displays the private key file name. Note the file name so you can locate it, then click Close to dismiss the prompt.

  10. Your Service Account is the Email address displayed under the Service Account section.

  11. Your Private Key is the file you just downloaded.

At this point all services and authorizations are configured for your project and you can start writing code or exploring the API.



您实际上不需要为 GAE 应用程序编写代码并部署它,请参阅 Is an App Engine instance required for accessing Datastore?

至于是否更经济(我认为与在 GAE 上运行应用程序相比) - 这取决于 很多在应用程序的使用/规模上,应用程序做什么以及如何做。

关于google-cloud-datastore - 如何将 Google 数据存储用于未托管在 Google 应用引擎中的网络应用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42051453/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com