<commit_before>let express = require("express");
let fs = require("fs");
let path = require("path");

process.nextTick(function () {
    let app = express();
    //Mout examples folder
    app.use("/examples", express.static(path.join(process.cwd(), "examples")));
    app.use("/data", express.static(path.join(process.cwd(), "examples", "data")));
    //Mount app files
    app.use("/", express.static(path.join(process.cwd(), "www")));
    //Index file
    app.get("/", function (req, res) {
        let indexFile = path.join(process.cwd(), "www", "index.html");
        return fs.readFile(indexFile, "utf8", function (error, content) {
            //TODO: check for error loading the file
            return res.type("html").send(content);
        });
    });
    //Run webservice
    app.listen(4000);
});
<commit_msg>Added logging to lab server script<commit_after>let express = require("express");
let morgan = require("morgan");
let fs = require("fs");
let path = require("path");

//Global configuration
let server = {
    "port": 4000
};

process.nextTick(function () {
    let app = express();
    //Enable logging
    //http://expressjs.com/en/resources/middleware/morgan.html
    app.use(morgan("dev"));
    //Mout examples folder
    app.use("/examples", express.static(path.join(process.cwd(), "examples")));
    app.use("/data", express.static(path.join(process.cwd(), "examples", "data")));
    //Mount app files
    app.use("/", express.static(path.join(process.cwd(), "www")));
    //Index file
    app.get("/", function (req, res) {
        let indexFile = path.join(process.cwd(), "www", "index.html");
        return fs.readFile(indexFile, "utf8", function (error, content) {
            //TODO: check for error loading the file
            return res.type("html").send(content);
        });
    });
    //Run webservice
    app.listen(server.port, function () {
        console.log(`[DEBUG] jviz-lab service listening on port '${server.port}'`);
    });
});

{'fraction_non_alphanumeric': 0.19141414141414143, 'fraction_numerical': 0.005050505050505051, 'mean_word_length': 3.1443514644351462, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '1623995', 'n_tokens_mistral': 611, 'n_tokens_neox': 604, 'n_words': 142}