title: How, in Node.js, to respond to a GET request from client (send some HTML in response)?
body: <p>I have a Node.js app which, among other things, responds to a <code>AJAX</code> (<code>jQuery</code>) <code>$.get()</code> request from a Web page by sending some HTML back to that page. The app uses Express.</p>
  
  <p>So in the server code, I have:</p>
  
  <p><code>app.get('/friends', api.friends);</code>, where <code>api</code> is defined as <code>api = require('./static/routes/api')</code> and i'm setting <code>app.use(app.router);</code>.</p>
  
  <p>In my<code>api.js</code> module, I have <code>api.friends</code> code: I have</p>
  
  <p><code>exports.friends = function(request, response)</code>
  <code>{</code>
  <code>...lots of code...</code>
  <code>};</code></p>
  
  <p>wherein I create some specific HTML.</p>
  
  <p>Now, my question is: How do I actually send this HTML back to the client? I can't use the passed-in <code>response</code> object because this is no longer an Express-type <code>response</code> object, so the usual <code>reponse.send()</code>, <code>.end()</code>, etc. methods don't exist.</p>
  
  <p>I have no idea what to do, reflecting a lack of understanding of Node and its innards (this is my first Node app), so any and all help will be greatly appreciated and welcomed. Thank you.</p>