Node.js loading Postgres SQL data into JS FIle

I'm attempting to load the Postgres data into node.js and I'm having a lot of difficulty with it. I know the constring works because I used it to send the data from the a textfile into the database.

var request = require('request');
var pg = require('pg');
var squel=require('squel');
var client = new pg.Client(conString);
var conString="postgres://postgres:Password@localhost:5433/postgres"

client.connect(function (err,data){
    if(err) console.log("Error connecting to PG", err);
    else{
    var query = squel.select().from('"ASNTable"')
    console.log(query.toString());
    client.query(query, function(res){
              var outputJSON = [];
              for (row in res){
                outputJSON.push(row);
              }
              return outputJSON
              console.log(outputJSON)
            });
    }
});

I keep getting "SELECT * FROM "ASNTable" so its like the client.query part never does anything?

@aembke I figured it out. The var conString should go before client.

var request = require('request');
var pg = require('pg');
var squel=require('squel');
var conString="postgres://postgres:Vcu3student@localhost:5433/postgres"
var client = new pg.Client(conString);
var outputJSON = [];

client.connect(function (err,data){
    if(err) console.log("'Error connecting to PG'", err);
    else{
    var query = squel.select().field("asnumber").from('"asntable"');
    client.query(query.toString(), function (err,res){
        if (err) throw err;
        var x = JSON.stringify(res);
        var y = x.split(",")
        // console.log(y[7])
        console.log(y.length);
        for (var i=0; i<y.length; i++){
            // console.log(y[i]);
            if (y[i].indexOf('"asnumber":') > 0)
            {
                console.log(y[i])
                outputJSON.push(y[i]);
            }
        };
        // console.log("result "+JSON.stringify(res))
          });
    }
});
console.log(outputJSON);