Permalink
Browse files

Setting up upload and save to log.txt

  • Loading branch information...
1 parent 5bc2d05 commit 17787ccc031b558880b7f1c85d10ec12c203eb8f @fabianhjr fabianhjr committed Dec 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 server/app.js
View
@@ -1,8 +1,13 @@
var express = require("express");
var app = express();
+app.use(express.bodyParser({ keepExtensions: true, uploadDir: 'uploads/' }));
+
var saveReport = function(report){
// Saves the report
+ fs.appendFile('log.txt', report, function(err){
+ console.log(err);
+ });
return 0;
};

0 comments on commit 17787cc

Please sign in to comment.