title: Callback not a function NodeJS
body: <p>I'm quite new in NodeJS, but I'm struggling also with concept of passing variables / objects between functions. I appreciate any help on what I am doing wrong.</p>
  
  <p>Please, consider this code:  </p>
  
  <p><strong>incoming request:</strong>  </p>
  
  <pre><code>{ 
      sender: '32165498732165845',
      text: 'shopping',
      originalRequest: 
      { 
          sender: { id: '32165498732165845' },
          recipient: { id: '87971441647898' },
          timestamp: 1488196261509,
          message: { mid: 'mid.1488196261509:c7ccb7f608', seq: 36372, text: 'shopping' } 
      },
      type: 'facebook' 
  }
  </code></pre>
  
  <p><strong>Extracting relevant variables:</strong>  </p>
  
  <pre><code>var userId = request.sender;
  var listName = request.text;
  </code></pre>
  
  <p><strong>bot.js:</strong>  </p>
  
  <pre><code>var listOps = require('./listops/test.js');
  listOps.setActive(function (userId, listName, callback) {
      console.log ('Here I expect a callback!');
      return callback; // This will send the message back to user.
  });
  </code></pre>
  
  <p><strong>listops/test.js:</strong>  </p>
  
  <pre><code>exports.setActive = function(userId, listName, callback) {
      var message = "User number " + userId + " asks to create a list with name " + listName + ".";
      console.log(userId);
      console.log(listName);
      callback (message);
  }
  </code></pre>
  
  <p>Now my issue is that in <code>listOps.js</code> the outcome of both console logs is not the value I expect, it says <code>[Function]</code> and <code>undefined</code>. Therefore I suspect, that this is a root cause for error message <code>[TypeError: callback is not a function]</code>.</p>
  
  <p>I'm using Claudia.js in Lambda.</p>