The easiest way to get started is by installing the gcloud package using npm:
$ npm install gcloud
With gcloud installed, your Node.js code is simpler to write, easier to read, and cleaner to integrate with your existing Node.js codebase. Take a look at the code required to retrieve entities from Datastore:
var gcloud = require('gcloud');
var dataset = new gcloud.datastore.Dataset({
projectId: 'my-project',
keyFilename: '/path/to/keyfile.json' // Details at
//https://github.com/googlecloudplatform/gcloud-node#README
});
dataset.get(dataset.key('Product', 123), function(err, entity) {
console.log(err, entity);
});
gcloud is open-sourced on Github; check out the code, file issues and contribute a PR - contributors are welcome. Got questions? Post them on StackOverflow with the [gcloud-node] tag.
Learn more about the Client Library for Node.js at http://googlecloudplatform.github.io/gcloud-node/ and try gcloud-node today.-Posted by JJ Geewax, Software Engineer
Node.js is a trademark of Joyent, Inc. and npm is a trademark of npm, Inc.