<commit_before>// Utility functions to spin up express.
"use strict";

module.exports = function(config) {
    var fluid = require("infusion");
    var express = fluid.registerNamespace("gpii.ul.api.tests.express");
    express.express = require("express");
    express.app = express.express();
    express.app.set("port", config.express.port);

    // These are required for all permission checks and user management calls
    var cookieParser = require("cookie-parser");
    express.app.use(cookieParser());
    // Causes problems with pouch...
    //// Required for session storage, must be called before session()
    //var session = require("express-session");
    //express.app.use(session({ secret: config.express.session.secret}));


    express.start = function(callback) {
        var http = require("http");
        http.createServer(express.app).listen(express.app.get("port"), function(){
            console.log("Express server listening on port " + express.app.get("port"));

            console.log("Express started...");

            if (callback) {
                callback();
            }
        });
    };

    return express;
};


<commit_msg>Reverted temporary changes to express/pouch configuration that were added while working on UL-21.<commit_after>// Utility functions to spin up express.
"use strict";

module.exports = function(config) {
    var fluid = require("infusion");
    var express = fluid.registerNamespace("gpii.ul.api.tests.express");
    express.express = require("express");
    express.app = express.express();
    express.app.set("port", config.express.port);

    // These are required for all permission checks and user management calls
    var cookieParser = require("cookie-parser");
    express.app.use(cookieParser());
    // Required for session storage, must be called before session()
    var session = require("express-session");
    express.app.use(session({ secret: config.express.session.secret}));


    express.start = function(callback) {
        var http = require("http");
        http.createServer(express.app).listen(express.app.get("port"), function(){
            console.log("Express server listening on port " + express.app.get("port"));

            console.log("Express started...");

            if (callback) {
                callback();
            }
        });
    };

    return express;
};



{'fraction_non_alphanumeric': 0.13990729034976823, 'fraction_numerical': 0.0008428150021070375, 'mean_word_length': 2.8790849673202614, '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': '3848793', 'n_tokens_mistral': 625, 'n_tokens_neox': 601, 'n_words': 162}