<commit_before>const express = require('express');
const compression = require('compression');

const server = express();

// Heroku fix
if (process.env.HEROKU) server.enable('trust proxy');

// compression for production environment
server.use(compression());

server.get('/', (req, res) => res.sendFile('index.html', { root: 'public' }));

// redirect any path with '.html' suffix to homepage
server.get(/\.html/, (req, res) => res.redirect(302, '/'));

// serve static files
server.use(express.static('public'));

const port = process.env.PORT || 3000;
server.listen(port, () => {
	console.log(`Listening on ${port}`);
});<commit_msg>fix(server): sets '*.html => *' redirection to 308 Permanent Redirection<commit_after>const express = require('express');
const compression = require('compression');

const server = express();

// Heroku fix
if (process.env.HEROKU) server.enable('trust proxy');

// compression for production environment
server.use(compression());

server.get('/', (req, res) => res.sendFile('index.html', { root: 'public' }));

// redirect any path with '.html' suffix to homepage
server.get(/\.html/, (req, res) => res.redirect(308, '/'));

// serve static files
server.use(express.static('public'));

const port = process.env.PORT || 3000;
server.listen(port, () => {
	console.log(`Listening on ${port}`);
});
{'fraction_non_alphanumeric': 0.1980495123780945, 'fraction_numerical': 0.012753188297074268, 'mean_word_length': 5.036199095022624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '5333375', 'n_tokens_mistral': 419, 'n_tokens_neox': 402, 'n_words': 107}