Skip to content

Commit

Permalink
speed up server middleware slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
subtleGradient committed Nov 18, 2013
1 parent cb6b7f3 commit b5b60a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grunt/config/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module.exports = function(grunt) {
if (!(req.method == 'POST' && req._parsedUrl.pathname.indexOf('/reportTestResults') === 0)) {
return next();
}
res.write('<!doctype html><meta charset=utf-8>');
res.end('Got it, thanks!');

var logType = 'writeln';
var message = req.body;

Expand All @@ -23,8 +26,6 @@ module.exports = function(grunt) {
message = JSON.stringify(message, null, 2);
}
grunt.log[logType]('[%s][%s]', req.headers['user-agent'], Date.now(), message);
res.write('<!doctype html><meta charset=utf-8>');
res.end('Got it, thanks!');
}

return {
Expand Down

0 comments on commit b5b60a6

Please sign in to comment.