<commit_before>
var http = require('http')
var methods = require('./methods')
var pkg = require('../package.json')
var response = require('./response')

var Server = module.exports = function() {

  var fn = function (req, res) {
    fn.handle(req, res)
  }

  fn.handle = addMethodHandlers(fn)

  fn.headers = {
    'Accept-Ranges': 'bytes',
    'Server': pkg.name + '/' + pkg.version
  }

  fn.listen = function () {
    var server = http.createServer(this)
    return server.listen.apply(server, arguments)
  }

  fn.response = { __proto__: response }

  return fn

}

function addMethodHandlers(to) {
<commit_msg>Expose server.mime<commit_after>
var http = require('http')
var methods = require('./methods')
var mime = require('./mime')
var pkg = require('../package.json')
var response = require('./response')

module.exports = function() {

  var fn = function (req, res) {
    fn.handle(req, res)
  }

  fn.handle = addMethodHandlers(fn)

  fn.headers = {
    'Accept-Ranges': 'bytes',
    'Server': pkg.name + '/' + pkg.version
  }

  fn.listen = function () {
    var server = http.createServer(this)
    return server.listen.apply(server, arguments)
  }

  fn.mime = mime

  fn.response = { __proto__: response }

  return fn

}

function addMethodHandlers(to) {

{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.0, 'mean_word_length': 3.2895622895622894, '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': '1299228', 'n_tokens_mistral': 437, 'n_tokens_neox': 414, 'n_words': 98}