Reputation: 4284
With Java and Python GAE applications can connect to local Datastore in development mode before send to appspot.com
I have install a Datastore as Local Development Server https://developers.google.com/datastore/docs/tools/devserver
I want to connect to local datastore using nodejs, I read this Google Tutorial to use Datastore with nodejs, but I don't found any information about how to connect
I follow this tutorial, but this only connect to a appstpot Datastore. https://developers.google.com/datastore/docs/getstarted/start_nodejs/
Thank you.
Upvotes: 1
Views: 1585
Reputation: 103
You can use datastore-emulator in your local apps.
Firstly, install google-cloud library. Then run,
gcloud auth login
gcloud -q components install beta cloud-datastore-emulator
gcloud -q beta emulators datastore start --no-store-on-disk --project='your_project_id'
Upvotes: 2
Reputation: 41
Now you can with gcloud, read the documents at:
https://googlecloudplatform.github.io/gcloud-node
Upvotes: 3
Reputation: 138
When I use gcloud.datastore.dataset({projectId: 'project-id'])
I'm getting the following error:
gcloud.datastore.dataset is not a function.
It works only when I set var ds = cloud.datastore({projectId: 'project-id'])
.
Upvotes: 0
Reputation: 3626
Not yet. The Cloud Datastore nodejs implementation uses JSON, which the local development server doesn't support yet. See the note at the top of this page: https://developers.google.com/datastore/docs/tools/devserver
Upvotes: 1