Skip to content

Instantly share code, notes, and snippets.

@Marak
Created January 21, 2010 15:40
Show Gist options
  • Save Marak/282890 to your computer and use it in GitHub Desktop.
Save Marak/282890 to your computer and use it in GitHub Desktop.
http.createServer(function (req, resp) {
var httpParams = {};
multipart.parse(req).addCallback(function() {
sys.puts('multipart.parse');
processRequest( req , resp , httpParams );
}).addErrback(function(err){
resp.sendHeader(200,{'Content-Type':'text/html'});
resp.sendBody('500 error in response :' + JSON.stringify(err));
resp.finish();
});
}).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment