<commit_before>////
//// If I spin the server out into a different project, what's added
//// above the MME laucher/base and messenger client code is:
////
////  messenger.js
////  static/messenger.html
////  node_modules/socket.io/
////
//// MSGPORT=3400 make start-messenger
////

var msgport = 3400; // default val
var msgdebug = 0; // default val
if( process.env.MSGPORT ){
    msgport = process.env.MSGPORT;
    console.log('messenger server port taken from environment: ' + msgport);
}else{
    console.log('messenger server port taken from default: ' + msgport);
}
if( process.env.MSGDEBUG ){
    msgport = process.env.MSGDEBUG;
    console.log('messenger debug level taken from environment: ' + msgdebug);
}else{
    console.log('messenger debug level taken from default: ' + msgdebug);
}

// Spin up the chat server.
var chat_app = require('express')();
var chat_server = require('http').createServer(chat_app);
var sio = require('socket.io').listen(chat_server);
chat_server.listen(msgport);

chat_app.get('/', function (req, res) {
		 res.sendfile(__dirname + '/static/messenger.html');
	     });

// TODO: Turn on recommended production settings when in production.
// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO#wiki-recommended-production-settings
sio.enable('browser client minification');
sio.enable('browser client etag');
sio.enable('browser client gzip');
sio.set('log level', msgdebug);
<commit_msg>server rollout not working, ready for better debugging<commit_after>////
//// If I spin the server out into a different project, what's added
//// above the MME laucher/base and messenger client code is:
////
////  messenger.js
////  static/messenger.html
////  node_modules/socket.io/
////
//// MSGPORT=3400 make start-messenger
////

var msgport = 3400; // default val
var msgdebug = 0; // default val
if( process.env.MSGPORT ){
    msgport = process.env.MSGPORT;
    console.log('messenger server port taken from environment: ' + msgport);
}else{
    console.log('messenger server port taken from default: ' + msgport);
}
if( process.env.MSGDEBUG ){
    msgdebug = process.env.MSGDEBUG;
    console.log('messenger debug level taken from environment: ' + msgdebug);
}else{
    console.log('messenger debug level taken from default: ' + msgdebug);
}

// Spin up the chat server.
var chat_app = require('express')();
var chat_server = require('http').createServer(chat_app);
var sio = require('socket.io').listen(chat_server);
chat_server.listen(msgport);

chat_app.get('/', function (req, res) {
		 res.sendfile(__dirname + '/static/messenger.html');
	     });

// TODO: Turn on recommended production settings when in production.
// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO#wiki-recommended-production-settings
sio.enable('browser client minification');
sio.enable('browser client etag');
sio.enable('browser client gzip');
sio.set('log level', msgdebug);

{'fraction_non_alphanumeric': 0.15208475734791524, 'fraction_numerical': 0.006151742993848257, 'mean_word_length': 3.911073825503356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7606032', 'n_tokens_mistral': 923, 'n_tokens_neox': 881, 'n_words': 245}