<commit_before>var fs = require('fs');
var http = require('http');
var st = require('st');
var url = require('url');

// Timestamp logs
require('logstamp')(console);

var port = process.argv[2] || process.env.PORT || 1776;

http.createServer(function (req, res) {
  var head, layout, main, nav, pn, sub, template;

  console.log(req.method, req.url);

  req.parsedUrl = url.parse(req.url, true);
  if (req.parsedUrl.pathname == '/') {
    if (req.parsedUrl.query.f == 'j') {
      return require('./api.js')(req, res);
    }
    res.setHeader('Content-Type', 'text/html');
    fs.createReadStream(__dirname + '/static/index.html').pipe(res);
    return;
  }

  st({path: __dirname + '/static'})(req, res);
}).listen(port, function () {
  console.log('Listening on port', port);
});
<commit_msg>Warn on Not Found<commit_after>var fs = require('fs');
var http = require('http');
var st = require('st');
var url = require('url');

// Timestamp logs
require('logstamp')(console);

var port = process.argv[2] || process.env.PORT || 1776;

http.createServer(function (req, res) {
  var head, layout, main, nav, pn, sub, template;

  console.log(req.method, req.url);

  req.parsedUrl = url.parse(req.url, true);
  if (req.parsedUrl.pathname == '/') {
    if (req.parsedUrl.query.f == 'j') {
      return require('./api.js')(req, res);
    }
    res.setHeader('Content-Type', 'text/html');
    fs.createReadStream(__dirname + '/static/index.html').pipe(res);
    return;
  }

  st({path: __dirname + '/static', passthrough: true})(req, res, function () {
    console.warn('Warning: Not Found');
    res.statusCode = 404;
    res.end('Not Found');
  });
}).listen(port, function () {
  console.log('Listening on port', port);
});

{'fraction_non_alphanumeric': 0.2038327526132404, 'fraction_numerical': 0.007549361207897794, 'mean_word_length': 3.8810198300283285, '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': '6285109', 'n_tokens_mistral': 610, 'n_tokens_neox': 599, 'n_words': 131}