Skip to content

Instantly share code, notes, and snippets.

@lele85
Created October 16, 2015 12:43
Show Gist options
  • Save lele85/fd785705a4a83b2bccef to your computer and use it in GitHub Desktop.
Save lele85/fd785705a4a83b2bccef to your computer and use it in GitHub Desktop.
var express = require("express");
var formidable = require("formidable");
var app = express();
app.post("/help/crashes", function (req, res) {
var form = new formidable.IncomingForm();
form.uploadDir = "./dumps";
form.keepExtensions = true;
form.parse(req, function(error, fields) {
if(!error){
console.log(fields);
console.log("CRASH DUMP COLLECTED");
}
res.end();
});
});
app.listen(3000);
console.log("Crash reporter server listening on: http://localhost:3000/help/crashes");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment