title: Connecting to AppEngine datastore in development via Cloud Datastore API
body: <p>We are currently running a combined AppEngine / GCE app and thus far have kept all of our datastore access on the AppEngine side of things.  Now we are exploring also allowing our GCE instance to make some queries into the (shared) datastore.  To start, I'm trying to figure out how to run things locally.  What we have so far:</p>
  
  <ul>
  <li>A Go devappserver running</li>
  <li>A Go standalone binary that wants to issues queries to the devappserver datastore.</li>
  <li>We installed ('go get') google-api-go-client/datastore/v1beta2 so that we can use an API instead of issuing direct HTTP calls.  However we are definitely willing to issue direct HTTP calls if this API library won't work in development.</li>
  <li>We have service accounts set up (we already access GCS from GCE) but I doubt that's relevant for running locally...</li>
  </ul>
  
  <p>I've seen some docs but they (a) only talk about Python &amp; Java, and (b) discuss connecting to the (standalone) development datastore server, as opposed to the datastore embedded in AppEngine's devappserver (if those are even different?).  There is also the following answer here on StackOverflow, but again it discusses connecting to the standalone development datastore server:</p>
  
  <p><a href="https://stackoverflow.com/questions/21703006/how-to-connect-to-the-local-google-cloud-storage-datastore-db/21735913#21735913">How to connect to the local google cloud Datastore db?</a></p>
  
  <p>Any pointers would be much appreciated!</p>
  
  <ul>
  <li>Ian</li>
  </ul>