<commit_before>var flatiron = require('flatiron'),
    path = require('path'),
    argv = require('optimist').argv,
    ecstatic = require('ecstatic'),
    app = flatiron.app;

var server = module.exports;

var opts = {
  root: argv._[0] || "./public",
  port: argv.p || 8080,
  host: argv.a || 'localhost',
  cache: argv.c || 3600, // in seconds.
  autoIndex: argv.i || true,
  silent: argv.s || argv.silent || false,
  help: argv.h || argv.help
}

var showHelp = function () {
  var help = [
      "usage: http-server [path] [options]",
      "",<commit_msg>[api] Default root is ./public if it exists, ./ otherwise<commit_after>var flatiron = require('flatiron'),
    path = require('path'),
    argv = require('optimist').argv,
    ecstatic = require('ecstatic'),
    app = flatiron.app;

var server = module.exports;

var opts = {
  root: argv._[0] || (path.existsSync("./public") ? "./public" : "./"),
  port: argv.p || 8080,
  host: argv.a || 'localhost',
  cache: argv.c || 3600, // in seconds.
  autoIndex: argv.i || true,
  silent: argv.s || argv.silent || false,
  help: argv.h || argv.help
}

var showHelp = function () {
  var help = [
      "usage: http-server [path] [options]",
      "",
{'fraction_non_alphanumeric': 0.19118869492934332, 'fraction_numerical': 0.014962593516209476, 'mean_word_length': 3.053872053872054, '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': '7615239', 'n_tokens_mistral': 421, 'n_tokens_neox': 411, 'n_words': 107}