How to connect to the local google cloud Datastore db?

后端 未结 1 1722
眼角桃花
眼角桃花 2021-01-24 18:10

I\'ve GAE application which creates some data in the Google Cloud Datastore and stores some binary files into the Google Cloud Storage - let\'s call the application WebA

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-24 18:32

    Google Cloud Datastore has a local development server that you can use: https://developers.google.com/datastore/docs/tools/devserver

    You can create and start the local datastore using the gcd tool which is linked to in the doc above.

    If you use DatastoreHelper.getDatastoreFromEnv(); to build your Datastore, you can tell it to connect to your local database by exporting the env variable DATASTORE_HOST:

    export DATASTORE_HOST=http://localhost:8080
    

    0 讨论(0)
提交回复
热议问题