Skip to content

Promise { <pending> } #1130

Closed
Closed
@tnsupport

Description

@tnsupport

we added a new query in some existing code and now get an error:

// ---from model.js
var pg = require('pg');
var jwt = require('jsonwebtoken');
var bcrypt = require('bcrypt');
var Pool = require('pg').Pool;

var connectString = {user:"xxx", password:"xxx",
host:"localhost", database:"xxx"};
var pool = new Pool(connectString);
var exports = module.exports = {};

exports.signupsInactiveList = function() {
var data = pool.query("select * from signups");
return data;
}

// ---from test.js script:
var res = model.signupsInactiveList();
console.log(res);

all that is returned is the following:
Promise { }

since we are not specifying any promises, don't know where this is coming from except maybe in the node v6.5 or in the pg pooling - any ideas ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions