I'm trying with no success to retrieve my Api key for a service stored as Entity in the Google Cloud Datastore from my NodeJs server running on GAE. I can't find any useful documentation, could someone help me to find out how to retrieve the Entity? Thank you in advance
My not working code:
const {Datastore} = require('@google-cloud/datastore');
const projectId = 'abcdefghi';
const ds = new Datastore({
projectId: projectId,
});
const keyName = 'UNSPLASH_KEY';
const kind = 'Strings';
const stringKey = ds.key([kind, keyName]);
var appkey = 'not set';
var entity = {
key: stringKey,
value: appkey,
};
entity = ds.get(stringKey);
