<commit_before>process.title = 'Template';

var http = require('http');
var repl = require('repl');
var express = require('express');
var ws = require('ws');

/////////////////
// HTTP server //
/////////////////

var FILE_PORT = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var IP = process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';
var app = express();
var httpServer = http.createServer(app);
httpServer.listen(FILE_PORT, IP);


// Simple static page server
app.use('/http', express.static('./http'));
app.use(express.compress());
console.log((new Date()) + ': Static file server listening at http://' + IP + ':' + FILE_PORT + '/http');

///////////////
// WS server //
///////////////

var websocket = new ws.Server({server: httpServer, path: '/ws'});

websocket.on('connection', function(connection) {
  console.log((new Date()) + ': Received connection from: ' + '?');
});

/////////
// CLI //
/////////

var cli = repl.start({});
cli.context.app = app;<commit_msg>server.js changes<commit_after>process.title = 'Template';

var http = require('http');
var repl = require('repl');
var express = require('express');
var ws = require('ws');

/////////////////
// HTTP server //
/////////////////

var PORT = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var IP = process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';
var app = express();
var httpServer = http.createServer(app);
httpServer.listen(PORT, IP);


// Simple static page server
app.use('/http', express.static('./http'));
app.use(express.compress());
console.log(new Date().toUTCString() + ': Static file server listening at http://' + IP + ':' + PORT + '/http');

///////////////
// WS server //
///////////////

var websocket = new ws.Server({server: httpServer, path: '/ws'});

websocket.on('connection', function(connection) {
  console.log(new Date().toUTCString() + ': Received WebSocket');
  
  connection.on('close', function() {
    console.log(new Date().toUTCString() + ': Closed WebSocket');
  });
});

/////////
// CLI //
/////////

var cli = repl.start({});
cli.context.app = app;
{'fraction_non_alphanumeric': 0.26346718903036237, 'fraction_numerical': 0.007835455435847209, 'mean_word_length': 2.9213051823416505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '553111', 'n_tokens_mistral': 654, 'n_tokens_neox': 627, 'n_words': 149}