Newb Question About Meteor.methods

if (Meteor.isServer) {
testRequest: function () {
return“GET”, “”);
testKnex: function () {
// this.unblock();
// var result = knexWorker();
// knexWorker();

      return knexWorker(function(val){
        //val is result
        console.log("result -> (val)", val);
        return val;



function knexWorker(cb){

var knex = require(‘knex’)({
client: ‘pg’,
connection: ‘postgresql://localhost/angularPizza’

console.log("result from knex test: ", result[0]);
// return result[0];
console.log("error with knex test: ", error);
// return error;

//The above is the server and below is the client if (Meteor.isClient) {“testKnex”, function(error, results) {
// var testTimeout = setTimeout(function(){
// console.log(error);
// console.log(results.);
// },10000);
//returns undefined
// On the client, if you do not pass a callback and you are not inside a stub, call will return undefined, and you will have no way to get the return value of the method. That is because the client doesn’t have fibers, so there is not actually any way it can block on the remote execution of a method.
console.log(results); // should be a JSON object


if (Meteor.isClient) {"testRequest", function(error, results) {
        // console.log(results.content); // should be a JSON object
        console.log("results: ", results);


So testKnex works to the extent that it gets the data to the server. I confirm this with a console log. But the client always saysa undefined. The testRequest works perfect, the data gets sent to the client. I don’t know how to fix the testKnex to make it work. I am brand new to Meteor. I know I should take advantage of Mongo and the built in power but let’s say that I wanted to get the data from the server to the client in the testKnex method, how would I do that?

Thank you for reading.

I figure it out. I cannot find a delete button for my post. Best