<commit_before>var http = require('http');
var node_static = require('node-static');

var sockjs_app = require('./sockjs_app');
var config = require('./config').config;


var static_directory = new node_static.Server(__dirname + '/html');


var server = http.createServer();
server.addListener('request', function(req, res) {
                       if (req.url === '/config.js') {
                           res.setHeader('content-type', 'application/javascript');
                           res.writeHead(200);
                           res.end('var client_opts = ' +
                                   JSON.stringify(config.client_opts) + ';');
                       } else{
                           static_directory.serve(req, res);
                       }
                   });
server.addListener('upgrade', function(req,res){
                       res.end();
                   });
sockjs_app.install(config, server);

console.log(" [*] Listening on", config.host + ':' + config.port);
server.listen(config.port, config.host);<commit_msg>cosmetic<commit_after>var http = require('http');
var node_static = require('node-static');

var sockjs_app = require('./sockjs_app');
var config = require('./config').config;


var static_directory = new node_static.Server(__dirname + '/html');


var server = http.createServer();
server.addListener('request', function(req, res) {
                       if (req.url === '/config.js') {
                           res.setHeader('content-type', 'application/javascript');
                           res.writeHead(200);
                           res.end('var client_opts = ' +
                                   JSON.stringify(config.client_opts) + ';');
                       } else {
                           static_directory.serve(req, res);
                       }
                   });
server.addListener('upgrade', function(req,res){
                       res.end();
                   });
sockjs_app.install(config, server);

console.log(" [*] Listening on", config.host + ':' + config.port);
server.listen(config.port, config.host);
{'fraction_non_alphanumeric': 0.14694656488549618, 'fraction_numerical': 0.0028625954198473282, 'mean_word_length': 1.766490765171504, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3898459', 'n_tokens_mistral': 554, 'n_tokens_neox': 528, 'n_words': 93}