[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-17 Thread Cesar SC
THIS CODE WORKS! //WORKS app.post('/getuserpost', (req, res) => { const query = datastore.createQuery('usersData').filter('girl', req.body. girl_field); datastore.runQuery(query).then((results) => { const entities = results[0]; datastore.get(entities[0][datastore.KEY], (err, entity) => { if (!err)

[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
Thanks for the answer Jordan. There are entities and I have done indexes after your answer but keeps without running. I'll wait to see if the new indexes loads -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this gro

[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
Tags for Node JS would be great for this group. I have forgotten to write Node JS in the title -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-app

[google-appengine] Re: I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
This doesn't work neither //DOESN'T WORK app.post('/getuserpost', (req, res) => { const query = datastore.createQuery('usersTable').filter('girl', req.body. girl_field).order('timestamp', { descending: true }).limit(10); datastore.runQuery(query).then((results) => { const entities = results[0];

[google-appengine] I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
const express = require('express'); const bodyParser = require('body-parser'); const engine = require('ejs-mate'); const Datastore = require('@google-cloud/datastore'); var app = express(); app.set('trust proxy', true); app.use(express.static(__dirname + '/public')); app.engine('ejs', engine); a

[google-appengine] I can't get data from Datastore in App Engine but can add and delete

2018-01-16 Thread Cesar SC
Does someone know what's wrong with this code? Thanks const express = require('express'); const bodyParser = require('body-parser'); const engine = require('ejs-mate'); const Datastore = require('@google-cloud/datastore'); var app = express(); app.set('trust proxy', true); app.use(express.static