<commit_before>var gzippo = require('gzippo');
var logger = require('morgan');
var express = require('express');
var app = express();

app.use(logger('combined'));
app.use(gzippo.staticGzip("" + __dirname + "/build"));
app.listen(process.env.PORT || 5000);<commit_msg>Catch all URL in express<commit_after>var fs = require('fs');
var gzippo = require('gzippo');
var logger = require('morgan');
var express = require('express');

var app = express();
var basePath = __dirname + "/build";

app.use('*', function(req, res) {
    var filename = req.originalUrl

    if (!fs.existsSync(basePath + filename))
        filename = "/index.html";

    res.sendFile(basePath + filename);
});

app.use(logger('combined'));
app.use(gzippo.staticGzip(basePath));
app.listen(process.env.PORT || 5000);
{'fraction_non_alphanumeric': 0.18829516539440203, 'fraction_numerical': 0.010178117048346057, 'mean_word_length': 5.346774193548387, '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': '3879915', 'n_tokens_mistral': 266, 'n_tokens_neox': 257, 'n_words': 57}