<commit_before>var URL = require('url'),
    express = require('express'),
    request = require('request'),
    logger = require('morgan'),
    errorHandler = require('errorhandler'),
    compiless = require('express-compiless'),
    jsxtransform = require('express-jsxtransform'),
    compilesass = require('express-compile-sass'),
    autoprefixer = require('express-autoprefixer'),
    processImage = require('express-processimage');

module.exports = function createLiveStyleApp(options) {
    var app = express(),
        proxyUrl;

    if (options.proxy) {
        if (!/\/$/.test(options.proxy)) {
            options.proxy += '/';
        }
        proxyUrl = URL.parse(options.proxy);
    }

    if (options.debug) {
        app.use(logger('dev'));
    }

    app.use(require('./middleware/bufferDataEventsUntilFirstListener')());

    if (!options.dead) {
        app.use(require('./middleware/injectLiveStyleScriptIncludeIntoHtml')(options));
    }

    if (options.mappings) {
        app.use(function (req, res, next) {<commit_msg>Log options when debugging is active<commit_after>var URL = require('url'),
    express = require('express'),
    request = require('request'),
    logger = require('morgan'),
    errorHandler = require('errorhandler'),
    compiless = require('express-compiless'),
    jsxtransform = require('express-jsxtransform'),
    compilesass = require('express-compile-sass'),
    autoprefixer = require('express-autoprefixer'),
    processImage = require('express-processimage');

module.exports = function createLiveStyleApp(options) {
    var app = express(),
        proxyUrl;

    if (options.debug) {
        console.warn('Staring with configuration:', JSON.stringify(options, undefined, 2));
    }

    if (options.proxy) {
        if (!/\/$/.test(options.proxy)) {
            options.proxy += '/';
        }
        proxyUrl = URL.parse(options.proxy);
    }

    if (options.debug) {
        app.use(logger('dev'));
    }

    app.use(require('./middleware/bufferDataEventsUntilFirstListener')());

    if (!options.dead) {
        app.use(require('./middleware/injectLiveStyleScriptIncludeIntoHtml')(options));
    }

    if (options.mappings) {
        app.use(function (req, res, next) {
{'fraction_non_alphanumeric': 0.15735359856951275, 'fraction_numerical': 0.0004470272686633885, 'mean_word_length': 3.175373134328358, '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': '2941153', 'n_tokens_mistral': 649, 'n_tokens_neox': 639, 'n_words': 109}