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)
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
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
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];
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
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