title: Speed up this (basic) node.js server
body: <p>I have a (stupid) node.js server that is here for the sole purpose of calling a function on the data it's passed with each request and answer the result of that function. Here is the code I use:</p>
  
  <pre><code>var pageDown = require('./PageDown/Markdown.Sanitizer').getSanitizingConverter(),
   http = require('http');
  
  http.createServer(function (req, res) {
    var data = "";
    res.writeHead(200, {'Content-Type': 'text/plain'});
    req.on('data', function (chunk) {
      data += chunk;
    });
    req.on('end', function() {
      res.end(pageDown.makeHtml(data));
    });
  }).listen(1337, '127.0.0.1');
  console.log('HServer running at http://127.0.0.1:1337/');
  </code></pre>
  
  <p>I use this server from python with the following code (atm I'm just benchmarking so it's just a stress test):
  </p>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  import requests
  
  for i in range(1, 100000):
      r = requests.post('http://localhost:1337/', data="lol")
      print i
  print "I'm done :')"
  </code></pre>
  
  <p>My problem is that this way of getting things done is slow. I have a large database that needs to be processed with this javascript function and I'm looking for ways to make the above process quicker. So suggestions are welcome!</p>