<commit_before>#!/usr/bin/env node

module.exports = MVC
MVC.settings = require('e_settings')
function MVC(app){
    var NODE_DOMAIN, fs, _
    // NODE_DOMAIN = require('domain').create()
    // NODE_DOMAIN.on('error', function (err) { console.log(err.message, err.stack) })
    // NODE_DOMAIN.run(function(){

    _ = require('lodash-node')
    _.chokidar = require('chokidar')
    fs = require('fs')

    _.extend(_, require('e_helpers_io'))
    _.extend(_, require('e_helpers_path'))
    _.extend(_, require('e_helpers_process'))
    _.extend(_, require('e_helpers_typecheck'))
    _.log = _.noop

    _.watch = function(file, cb){
        function reload(err, data){
            if (err) throw err
            _.log('file updated: '+file)
            cb(data)
        }
        _.chokidar
        .watch(file, {persistent: true})
        .on('change', function(){
            fs.readFile(file, reload)
        })
    }

    var easyioc = require('easyioc')
    var router = require('runway')

    function adapt(module){
        return (_.isString(module))
            ? function(){ return require(module) }
            : function(){ return module }
    }

    var server = require('http').createServer(router.listener)

    easyioc
        .add( '_',               adapt(_)               )<commit_msg>Add support for HTTPS.<commit_after>#!/usr/bin/env node

module.exports = MVC
MVC.settings = require('e_settings')
function MVC(app){
    var NODE_DOMAIN, fs, _
    // NODE_DOMAIN = require('domain').create()
    // NODE_DOMAIN.on('error', function (err) { console.log(err.message, err.stack) })
    // NODE_DOMAIN.run(function(){

    _ = require('lodash-node')
    _.chokidar = require('chokidar')
    fs = require('fs')

    _.extend(_, require('e_helpers_io'))
    _.extend(_, require('e_helpers_path'))
    _.extend(_, require('e_helpers_process'))
    _.extend(_, require('e_helpers_typecheck'))
    _.log = _.noop

    _.watch = function(file, cb){
        function reload(err, data){
            if (err) throw err
            _.log('file updated: '+file)
            cb(data)
        }
        _.chokidar
        .watch(file, {persistent: true})
        .on('change', function(){
            fs.readFile(file, reload)
        })
    }

    var easyioc = require('easyioc')
    var router = require('runway')

    function adapt(module){
        return (_.isString(module))
            ? function(){ return require(module) }
            : function(){ return module }
    }

    var server = require('http').createServer(router.listener)
    server.cert = function(cert){
        return require('https').createServer(cert, router.listener)
    }

    easyioc
        .add( '_',               adapt(_)               )
{'fraction_non_alphanumeric': 0.15316965921582998, 'fraction_numerical': 0.0, 'mean_word_length': 2.3496932515337425, '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': '5570029', 'n_tokens_mistral': 860, 'n_tokens_neox': 840, 'n_words': 164}