<commit_before>var http = require('http');
var path = require('path');
var fs = require('fs');
var shoe = require('shoe');
var Stweam = require('stweam');
var habitat = require('habitat');
var ecstatic = require('ecstatic');

var argv = require('yargs')
  .demand('track')
  .describe('track', 'Set the phrases that will determine what is delivered from Twitter')
  .argv;

var env = habitat.load(path.join(__dirname, '../.env'));

var server = http.createServer(
  ecstatic({ root: path.join(__dirname, '../static') })    
).listen(3000);

console.log('chirp listening on port 3000');

var twitter = new Stweam({<commit_msg>Add ability to set server port<commit_after>var http = require('http');
var path = require('path');
var fs = require('fs');
var shoe = require('shoe');
var Stweam = require('stweam');
var habitat = require('habitat');
var ecstatic = require('ecstatic');

var argv = require('yargs')
  .demand('track')
  .describe('track', 'Set the phrases that will determine what is delivered from Twitter')
  .default('port', 3000)
  .describe('port', 'Set the port the server will bind to')
  .argv;

var env = habitat.load(path.join(__dirname, '../.env'));

var server = http.createServer(
  ecstatic({ root: path.join(__dirname, '../static') })    
).listen(argv.port, function(){
  var address = server.address();
  console.log('chirp listening at http://%s:%d/', address.address, address.port);
});

var twitter = new Stweam({
{'fraction_non_alphanumeric': 0.17891816920943135, 'fraction_numerical': 0.008321775312066574, 'mean_word_length': 4.865853658536586, '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': '4961875', 'n_tokens_mistral': 458, 'n_tokens_neox': 439, 'n_words': 138}