title: How to call GCP Datastore from GCP Cloud Function?
body: <p>Here's the starter code provided with a new GCP Cloud Function:</p>
  
  <pre><code>/**
   * Responds to any HTTP request that can provide a "message" field in the body.
   *
   * @param {!Object} req Cloud Function request context.
   * @param {!Object} res Cloud Function response context.
   */
  exports.helloWorld = function helloWorld(req, res) {
    // Example input: {"message": "Hello!"}
    if (req.body.message === undefined) {
      // This is an error case, as "message" is required.
      res.status(400).send('No message defined!');
    } else {
      // Everything is okay.
      console.log(req.body.message);
      res.status(200).send('Success: ' + req.body.message);
    }
  };
  </code></pre>
  
  <p>... and the package.json:</p>
  
  <pre><code>{
    "name": "sample-http",
    "version": "0.0.1"
  }
  </code></pre>
  
  <p>Looking for a basic example of calling DataStore from here.</p>