<commit_before>var fs = require('fs');
var EventEmitter = require('events').EventEmitter;
var Static = require('node-static');
var config = require('./config');
var Cache = require(config.paths.LIB_ROOT + 'utils/cache');

// create server object
process.mono = new EventEmitter();
process.mono.config = config;

// create caches
process.mono.cache = {
    client: Cache(),
    projects: Cache(),
    instances: Cache(),
    stores: Cache(),
    models: Cache(),
    views: Cache(),
    snippets: Cache(),
    public: Cache()
};

// error handling
process.mono.error = require(config.paths.LIB_ROOT + 'utils/error');

// static file servers
//process.mono.file = {
//    public: new Static.Server(config.paths.PUBLIC_ROOT, {cache: 604800})
//};

// setup session middleware
require(config.paths.MIDDLEWARE + 'session')(function (err) {
    
    // terminate process on error
    if (err) {
        throw new Error(err);
    }
    
    // init and cache core module instance
    require(config.paths.MODULE + 'module')();
    
    // emit api ready
    process.mono.emit('ready');
});<commit_msg>removed obsolete node-static server instance<commit_after>var fs = require('fs');
var EventEmitter = require('events').EventEmitter;
var Static = require('node-static');
var config = require('./config');
var Cache = require(config.paths.LIB_ROOT + 'utils/cache');

// create server object
process.mono = new EventEmitter();
process.mono.config = config;

// create caches
process.mono.cache = {
    client: Cache(),
    projects: Cache(),
    instances: Cache(),
    stores: Cache(),
    models: Cache(),
    views: Cache(),
    snippets: Cache(),
    public: Cache()
};

// error handling
process.mono.error = require(config.paths.LIB_ROOT + 'utils/error');

// setup session middleware
require(config.paths.MIDDLEWARE + 'session')(function (err) {
    
    // terminate process on error
    if (err) {
        throw new Error(err);
    }
    
    // init and cache core module instance
    require(config.paths.MODULE + 'module')();
    
    // emit api ready
    process.mono.emit('ready');
});
{'fraction_non_alphanumeric': 0.1563845050215208, 'fraction_numerical': 0.0028694404591104736, 'mean_word_length': 3.3134020618556703, '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': '66991', 'n_tokens_mistral': 637, 'n_tokens_neox': 633, 'n_words': 163}