<commit_before><commit_msg>Added server.js<commit_after>#!/usr/bin/env node
var http = require('http');
var fs   = require('fs');
var d    = require('../dist/decorators.min.js');
//var dir  = '/Users/jared/Dev/decorators-js';
var dir  = '.';
var read = d.denodeify(fs.readFile);
var server = http.createServer(function(req, res) {
  //this is terrible, but simple enough for testing
  var reqPath = dir + req.url;
  var path = reqPath === './' ? './spec/index.html' : reqPath;
  var p = read(path, 'utf-8');
  p.then(function(fstr) {
    res.end(fstr);
  }).catch(function(e) {
    res.statusCode = 404;
    res.end('File not found');
  });
});
server.listen(8080, function() {
  console.log('Listening at localhost 8080');
});

{'fraction_non_alphanumeric': 0.19642857142857142, 'fraction_numerical': 0.016483516483516484, 'mean_word_length': 3.643312101910828, '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': '5954066', 'n_tokens_mistral': 270, 'n_tokens_neox': 259, 'n_words': 59}