title: res.send() Not Working When Inside of a Callback
body: <p>I'm using express and attempting a simple GET querying my database. The client never receives the string from the server if it is being sent from the callback; meaning, the following code never sends the string back:</p>
  <pre><code>app.get('/search', function (req, res) {
      ul.readTable(req.query.q, (stringToReturn) =&gt; {
          res.send(stringToReturn);
      })
  }
  </code></pre>
  <p>The part that is particularly confusing to me is that if I put the res.send() outside of the callback, and send some dummy string, it successfully sends. So this code does manage to send a string:</p>
  <pre><code>app.get('/search', function (req, res) {
      ul.readTable(req.query.q, (stringToReturn) =&gt; {
      })
      res.send(&quot;dummy string&quot;);
  }
  </code></pre>
  <p>Obviously this isn't much use since it can't hold the data I want to send back, but it does mean there shouldn't be any other discrepancies. I have tried sending back a dummy string from the callback, but this also failed to send. I would think this would mean the issue would be from the fact that the res.send() is in the callback, but I've seen plenty of examples of others sending the data back in the callback.</p>