<commit_before>#!/usr/bin/env node
'use strict';

var restify = require('restify');
//var errors = require('restify-errors');
var toCSV = require('../lib');

var pkg = require('../package.json');

// Get untrackable configurations.
var config = {};
try {
  config = require('../config.json'); //eslint-disable-line global-require
} catch (err) {
  if (!err.message || err.code !== 'MODULE_NOT_FOUND') {
    throw err;
  }
}

var serviceName = process.env.npm_package_name || pkg.name;


var server = restify.createServer({
  name:    serviceName,
  version: '1.0.0'
});


server.post('/', restify.bodyParser(), toCSV.httpHandler);


server.listen(config.port || process.env.PORT || process.env.npm_package_config_port || 15000, function () {
  const addr = server.address();
  const bind = typeof addr === 'string'
    ? 'pipe ' + addr
    : 'port ' + addr.port;
  console.log('Listening on ' + bind);
});
<commit_msg>approve console log<commit_after>#!/usr/bin/env node
'use strict';

var restify = require('restify');
//var errors = require('restify-errors');
var toCSV = require('../lib');

var pkg = require('../package.json');

// Get untrackable configurations.
var config = {};
try {
  config = require('../config.json'); //eslint-disable-line global-require
} catch (err) {
  if (!err.message || err.code !== 'MODULE_NOT_FOUND') {
    throw err;
  }
}

var serviceName = process.env.npm_package_name || pkg.name;


var server = restify.createServer({
  name:    serviceName,
  version: '1.0.0'
});


server.post('/', restify.bodyParser(), toCSV.httpHandler);


server.listen(config.port || process.env.PORT || process.env.npm_package_config_port || 15000, function () {
  const addr = server.address();
  const bind = typeof addr === 'string'
    ? 'pipe ' + addr
    : 'port ' + addr.port;
  console.log('Listening on ' + bind); // eslint-disable-line no-console
});


// 192.168.3.1118
{'fraction_non_alphanumeric': 0.18469656992084432, 'fraction_numerical': 0.01424802110817942, 'mean_word_length': 3.704714640198511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '2514242', 'n_tokens_mistral': 664, 'n_tokens_neox': 631, 'n_words': 141}