<commit_before>var express = require('express');
var sio = require('socket.io');

module.exports = {
	
};
<commit_msg>added basic functionality, still wip though<commit_after>var express = require('express');
var sio = require('socket.io');

var debug = false;

var mainApp = express();

var subApps = [];

function addApplication (options) {
	if (debug) console.log('exp mount ' + options.name + ' as ' + options.mountPoint + ' (' + options.script + ')');
	var router = express.Router();
	subApps.push(router);
	var script = require(options.script);
	script.init(router);
	mainApp.use(options.mountPoint, router);
}

function enableWebUI (options) {
	if (debug) console.log('exp enable webui');
	var router = express.Router();
	router.get('/', function (req, res) {
		res.send('admin ui goes here');
	});
	mainApp.use(options.mountPoint, router);
}

function listen (port) {
	if (debug) console.log('exp listen ' + port);
	mainApp.listen(port);
}

module.exports = {
	enableWebUI: enableWebUI,
	addApplication: addApplication,
	listen: listen,
	debug: function (value) {
		debug = value;
	}
};

{'fraction_non_alphanumeric': 0.16255707762557078, 'fraction_numerical': 0.0, 'mean_word_length': 4.86096256684492, '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': '5342082', 'n_tokens_mistral': 360, 'n_tokens_neox': 356, 'n_words': 89}