I have a non-GAE backend that's using the Remote API to access datastore. The only way to do this (without a proxy GAE service) is to use the GAE Remote API.
This works fine when connecting the Remote Context to a GAE production deployment, but what about GAE dev server?
I want to be able to test my changes locally before deploying anything. Is there a way to connect the remote API to a local GAE dev server datastore?
Relevant sample code:
func getRemoteCtx(ctx context.Context, r *http.Request) (context.Context, error) {
ts, err := google.DefaultTokenSource(ctx,
"https://www.googleapis.com/auth/appengine.apis",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/cloud-platform",
)
if err != nil {
log.Fatal(err)
}
hc := oauth2.NewClient(ctx, ts)
host := "myapp.appspot.com"
log.Printf("create remote context with host: %s", host)
return remote_api.NewRemoteContext(host, hc)
}
Check out the host
. Is there a way to set this to a local GAE dev server?