<commit_before>// routes.js
// aoneill - 04/13/15

var cp = require('child_process');

module.exports.load = function(server) {
  // Home view
  server.get('/', function(req, res) {
    res.render('home');
  });
  
  // Git update endpoint
  server.post('/update', function(req, res) {
    var str = '';
    var git = cp.spawn('/usr/local/bin/aoneill.me-update',
      [__dirname]);
    
    git.stdout.on('data', function(chunk) {
      str += chunk;
    });

    git.stdout.on('end', function() {
      res.json({
        success: true,
        out: str
      });
    });
  });

  // Last route -- 404 Route
  server.get('/*', function(req, res) {
    res.send('404');
  });
}<commit_msg>Changed 404 route to be ALL rather than just GET<commit_after>// routes.js
// aoneill - 04/13/15

var cp = require('child_process');

module.exports.load = function(server) {
  // Home view
  server.get('/', function(req, res) {
    res.render('home');
  });
  
  // Git update endpoint
  server.post('/update', function(req, res) {
    var str = '';
    var git = cp.spawn('/usr/local/bin/aoneill.me-update',
      [__dirname]);
    
    git.stdout.on('data', function(chunk) {
      str += chunk;
    });

    git.stdout.on('end', function() {
      res.json({
        success: true,
        out: str
      });
    });
  });

  // Last route -- 404 Route
  server.all('/*', function(req, res) {
    res.send('404');
  });
}
{'fraction_non_alphanumeric': 0.1978798586572438, 'fraction_numerical': 0.019081272084805655, 'mean_word_length': 2.2930232558139534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2159992', 'n_tokens_mistral': 509, 'n_tokens_neox': 482, 'n_words': 101}